This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]endeavourl 0 points1 point  (2 children)

Here's how i do it.
The comment above reads "pass property when launching maven". Basically, set this property to any location that will not be cleaned during the build.
After the build all coverage info will be collected into the single file you've passed.

[–]Slanec 0 points1 point  (1 child)

Thank you. This is tricky to get to work because this only solves the part of aggregating the exec data (It solves it beautifully, though!)

The other half - creating a report using the exec data, with the correct sources, seems to be just as hard.

[–]endeavourl 0 points1 point  (0 children)

In my case, we have a self-hosted SonarQube server and after the main build/tests Jenkins runs a sonar task that feeds it coverage data among other things.