Java project config (JaCoCo)

JaCoCo reports are an essential component of Cover Reports. This requires a minor config update for your projects to add the appropriate dependencies and plugins (if you're not already using JaCoCo).

Add the following declarations to the pom.xml file for the project:

<dependency>
  <groupId>org.jacoco</groupId>
  <artifactId>jacoco-maven-plugin</artifactId>
  <version>0.8.7</version>
</dependency>
<plugin>
  <groupId>org.jacoco</groupId>
  <artifactId>jacoco-maven-plugin</artifactId>
  <version>0.8.7</version>
  <executions>
    <execution>
      <goals>
        <goal>prepare-agent</goal>
      </goals>
    </execution>
    <execution>
      <id>report</id>
      <phase>test</phase>
      <goals>
        <goal>report</goal>
      </goals>
    </execution>
  </executions>
</plugin>

You may also want/need to download an appropriate version of JaCoCo (0.8.3+) for use with your Cover projects as well. Note that this version may be different to the JaCoCo Maven plugin version.

Last updated