1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
<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>io.undertow</groupId>
<artifactId>undertow-parent</artifactId>
<version>2.3.20.Final</version>
</parent>
<artifactId>undertow-coverage-report</artifactId>
<name>Undertow Test Coverage Report</name>
<description>aggregates and compiles jacoco test coverage report</description>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${version.org.jacoco}</version>
<executions>
<execution>
<id>merge-reports</id>
<phase>test-compile</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<fileSets>
<fileSet>
<directory>${project.basedir}/../</directory>
<includes>
<include>**/target/jacoco.exec</include>
</includes>
</fileSet>
</fileSets>
</configuration>
</execution>
<execution>
<id>compile-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- copy the ant tasks jar -->
<execution>
<id>jacoco-dependency-ant</id>
<goals>
<goal>copy</goal>
</goals>
<phase>test-compile</phase>
<inherited>false</inherited>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.ant</artifactId>
<version>${version.org.jacoco}</version>
</artifactItem>
</artifactItems>
<stripVersion>true</stripVersion>
<outputDirectory>${basedir}/target/jacoco-jars</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Execute an ant task within maven -->
<echo message="Generating JaCoCo Reports" />
<taskdef name="report" classname="org.jacoco.ant.ReportTask">
<classpath path="${basedir}/target/jacoco-jars/org.jacoco.ant.jar" />
</taskdef>
<mkdir dir="${basedir}/target/coverage-report" />
<report>
<executiondata>
<fileset dir="${basedir}/../core/target">
<include name="jacoco.exec" />
</fileset>
<fileset dir="${basedir}/../servlet/target">
<include name="jacoco.exec" />
</fileset>
<fileset dir="${basedir}/../websockets-jsr/target">
<include name="jacoco.exec" />
</fileset>
</executiondata>
<structure name="jacoco-multi Coverage Project">
<group name="jacoco-multi">
<classfiles>
<fileset dir="${basedir}/../core/target/classes" />
<fileset dir="${basedir}/../servlet/target/classes" />
<fileset dir="${basedir}/../websockets-jsr/target/classes" />
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${basedir}/../core/src/main/java" />
<fileset dir="${basedir}/../servlet/src/main/java" />
<fileset dir="${basedir}/../websockets-jsr/src/main/java" />
</sourcefiles>
</group>
</structure>
<html destdir="${basedir}/target/coverage-report/html" />
<xml destfile="${basedir}/target/coverage-report/coverage-report.xml" />
<csv destfile="${basedir}/target/coverage-report/coverage-report.csv" />
</report>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.ant</artifactId>
<version>${version.org.jacoco}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
|