Hello,
Our project is a multi-module project like this:
root
+ module 1
+ module 2
+ module 3
+ module 3.1
+ module 3.2
+ aggregator module
We started coveralls.io 1 year ago. To take into account the cross module
tests, we use the report-aggregate goal which is able to retrieve the
jacoco.exec files from the dependencies. This works as expected (thanks for
that !)
Since few months, we also use sonarcloud.io. The code coverage in sonar is
lesser than the code coverage in coveralls. We understand the difference (cross
module tests) and we tried to fix it.
I tried to use the jacoco:merge goal but I have to give the list of all
jacoco.exec files I want to merge. It’s error prone (it’s easy to forget to add
a new module to this list)
It could be great if you can add a feature to retrieve the files to merge from
dependencies or if the report-aggregate goal could also generate a merged exec
file in addition of the XML, CSV and HTML reports.
I enable the append mode in the jacoco:prepare-agent configuration but it’s
difficult to set the destFile. I created a property in the parent pom.xml like
this:
<jacoco.destFile>${project.parent.build.directory}</jacoco.destFile>
Due to the project structure, this property have to be changed in several
modules (module 3.1 and 3.2 in the example), or simply in module 3 to be
inherited by children.
This solution is working but I’m not sure I did things properly. Can I do
something more clever?
Thanks !
Mathieu
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/51257a37-a19f-40cf-a396-f1ea9d956369%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.