Aggregated report for maven multi-modules project

404 views
Skip to first unread message

plo...@gmail.com

unread,
Oct 27, 2016, 5:44:20 AM10/27/16
to JaCoCo and EclEmma Users
Hi there,

I'm looking for a way to aggregate coverage report for a multi-modules maven project.

My project looks like:

Root
|-Module 1
|-Module 2
|-Module 3
|-|-Submodule 1
|-|-Submodule 2
|-Module 4

Some of the modules depend on some other, some do not.

What I would like to do is run "mvn test" on the root module, that will run all the tests for all the modules, and generate a single aggregated report covering all the modules.

I'm aware of "report-aggregate", but it aggregates reports only for the dependencies of a given module, which does not work in my case.

Is there a way to achieve that without having to create one "fake" module dependent on all the others? This is not suitable for me, as I have 25+ modules and it would require to manually list all of them and keep updating this list whenever I add a new module.

Thanks!

Marc R. Hoffmann

unread,
Oct 27, 2016, 5:50:46 AM10/27/16
to jac...@googlegroups.com
Hi,

unfortunatelly creating a explicit reporting module ("fake") is the only
design we currentls support. We didn't find a other way to implement
this in Maven. Here you find some reasoning about this design:
https://github.com/jacoco/jacoco/wiki/MavenMultiModule

Alternatively you might consider external tools like SonarQube to create
reports.

Regards,
-marc

plo...@gmail.com

unread,
Oct 27, 2016, 5:58:46 AM10/27/16
to JaCoCo and EclEmma Users
Hi,

I have already read the page you've linked, but I wanted to be sure I did not miss the point. So now it is clear :)

Thanks for the quick reply!

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages