Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to combine JaCoCo reports from multiple sub projects

I have a working setup for a simple SBT build but now I am dealing with a multi project build. At the moment SBT jacoco:cover produces reports inside each sub project but I would like to have an aggregate at the root level /target/scala-2.xx/jacoco.

like image 413
Petteri H Avatar asked Oct 16 '25 13:10

Petteri H


1 Answers

Jacoco has jacoco:merge ant target which you can integrate with SBT to merge reports from subprojects.

<jacoco:merge destfile="merged.exec">
    <fileset dir="dir_common_location" includes="*.exec"/>
</jacoco:merge>
  • Put individual report from each project in a common location.
  • Merge those report to a single merged.exec
like image 120
vionixt Avatar answered Oct 18 '25 06:10

vionixt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!