I am looking for a solution to use jacoco:check in a multi module maven project.
The requirement is to put a threshold of 80% coverage check on the entire application instead of individual module.
Right now, it fails the build even if the check for one module is not above the threshold value. I have already created a separate jacoco-aggregate-module where I am aggregating the multi module results.
Configuration of jacoco in parent pom.xml:
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<!-- Prepare the JaCoCo agent before tests run -->
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
</plugin>