Merge Jacoco coverage reports into one unique report.
This commit is contained in:
parent
e98dbc537d
commit
8a9022c631
@ -25,5 +25,38 @@
|
||||
<module>pc-axis</module>
|
||||
<!-- Add new extensions here -->
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>prepare-agent</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
<phase>process-test-resources</phase>
|
||||
<configuration>
|
||||
<destFile>${project.parent.build.directory}/report/${project.name}.exec</destFile>
|
||||
<propertyName>surefireArgs</propertyName>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<dataFile>${project.parent.build.directory}/report/${project.name}.exec</dataFile>
|
||||
<outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
|
29
pom.xml
29
pom.xml
@ -107,7 +107,7 @@
|
||||
</goals>
|
||||
<phase>process-test-resources</phase>
|
||||
<configuration>
|
||||
<destFile>${project.build.directory}/report/jacoco.xml</destFile>
|
||||
<destFile>${project.build.directory}/report/jacoco.exec</destFile>
|
||||
<propertyName>surefireArgs</propertyName>
|
||||
</configuration>
|
||||
</execution>
|
||||
@ -117,11 +117,36 @@
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<dataFile>${project.build.directory}/report/jacoco.xml</dataFile>
|
||||
<dataFile>${project.build.directory}/report/jacoco.exec</dataFile>
|
||||
<outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>merge</id>
|
||||
<goals>
|
||||
<goal>merge</goal>
|
||||
</goals>
|
||||
<phase>prepare-package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<destFile>${project.build.directory}/report/jacoco-merged.exec</destFile>
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>${project.build.directory}/report</directory>
|
||||
<includes>
|
||||
<include>jacoco.exec</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>extensions/target/report</directory>
|
||||
<includes>
|
||||
<include>*.exec</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</configuration>
|
||||
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
Loading…
Reference in New Issue
Block a user