Jacoco Check for Multi Module Maven Project

23 views
Skip to first unread message

Anudhi Jain

unread,
Aug 26, 2021, 10:20:23 AM8/26/21
to JaCoCo and EclEmma Users
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 as we have Integration tests as well which are written across module.

Right now, it fails the build even if the check for one module is not above the threshold value. Configuration of jacoco check in parent pom.xml:

<execution>
<phase>verify</phase>
<configuration>
<rules>
<rule>
<element>BUNDLE</element>
<limits>
<limit>
<counter>LINE</counter>
<minimum>0.80</minimum>
<value>COVEREDRATIO</value>
</limit>
</limits>
</rule>
</rules>
</configuration>
<goals>
<goal>check</goal>
</goals>
<id>jacoco-check</id>
</execution>




Marc Hoffmann

unread,
Aug 26, 2021, 2:21:02 PM8/26/21
to JaCoCo and EclEmma Users
Hi,

we don’t have a a check goal for multi module maven projects. Maybe some of these options can help:

- create your custom check logic with the report Ant task (can be embedded in a Maven build)
- Use the report-aggregate goal and write your own check logic on the xml report (total coverage is reported at the root)
- consider using a continuous inspection tool like SonarQube

Best regards,
-marc

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/3d92cb62-bce0-4c8e-a378-1034223f0e6an%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages