I've integrated the jacoco-maven-plugin
in my project, based on this excellent guide: http://www.petrikainulainen.net/programming/maven/creating-code-coverage-reports-for-unit-and-integration-tests-with-the-jacoco-maven-plugin/
The Jacoco plugin runs fine. However, the maven-site-plugin
does not include the Jacoco reports in the site. To be more specific: the 'Project Reports' section does not list the Jacoco reports. The Jacoco reports themselves are available in the target/site/jacoco-ut
and target/site/jacoco-it
directories.
Here's what I did (without success so far).
First, included the jacoco-maven-plugin
as a plugin in the build
section of my pom.xml
, as explained in the guide referenced above. I'm using Jacoco version 0.6.4.201312101107.
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.plugin.version}</version>
<executions>
<!-- scissors... -->
<!-- report goal is bound to the pre-site phase -->
</executions>
</plugin>
Second, included the jacoco-maven-plugin
in the report
section of my pom.xml
: no success.
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.plugin.version}</version>
</plugin>
Third, tried to add a reportsets
section to the jacoco-maven-plugin
in the report
section: no success.
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.plugin.version}</version>
<reportSets>
<reportSet>
<reports>
<report>report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
Can anyone help me to make the maven-site-plugin
reference the coverage reports generated by Jacoco in the 'Project Reports' section of the site?