<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jboss.windup</groupId>
        <artifactId>windup-parent</artifactId>
        <version>6.1.2.Final-redhat-00001</version>
    </parent>

    <artifactId>windup-coverage-report</artifactId>

    <name>Windup - Coverage Report</name>

    <dependencies>
        <dependency>
            <groupId>org.jacoco</groupId>
            <artifactId>org.jacoco.ant</artifactId>
            <version>${version.jacoco}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jacoco-report-ant</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <taskdef name="report" classname="org.jacoco.ant.ReportTask">
                                    <classpath refid="maven.compile.classpath" />
                                </taskdef>

                                <report>
                                    <executiondata>
                                        <fileset dir="${basedir}/..">
                                            <include name="**/jacoco.exec" />
                                        </fileset>
                                    </executiondata>
                                    <structure name="Windup Coverage Report">
                                        <classfiles>
                                            <fileset dir="${basedir}/..">
                                                <include name="**/target/classes/org/jboss/windup/**/*.class" />
                                            </fileset>
                                        </classfiles>
                                        <sourcefiles encoding="UTF-8">
                                            <fileset dir="${basedir}/..">
                                                <include name="**/src/main/java/org/jboss/windup/**/*.java" />
                                            </fileset>
                                        </sourcefiles>
                                    </structure>
                                    <html destdir="${basedir}/target/coverage-report" />
                                </report>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
