Skip to content
Advertisement

Jacoco Maven multi module project coverage

Seems like there are couple of questions, which are quite old and things changed from Java 8 support of Jacoco.

My Project contains following structure

JavaScript

I have configured the main pom like this

Main POM.xml

JavaScript

A Pom.xml

JavaScript

B pom.xml

JavaScript

I am executing this command mvn clean package. I can see jacoco.exec is getting generated, however I am not able to see any HTML reports are being to verify the data.

Please help me with this. Another point is, my configuration is correct for Multi-Module projects?

Update

Identified issue. <destFile>${project.basedir}/../target/jacoco.exec</destFile> changed to <destFile>${project.basedir}/target/jacoco.exec</destFile>

Now it’s generating reports for individual modules. Any idea how to generate consolidated report

Advertisement

Answer

JaCoCo version 0.7.7 can generate an aggregate coverage report from multiple Maven modules through a new goal jacoco:report-aggregate.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement