trautonen / coveralls-maven-plugin

Maven plugin for submitting Java code coverage reports to Coveralls web service.
MIT License
312 stars 123 forks source link

Aggregate Jacoco coverage for multimodule project #101

Closed amihaiemil closed 7 years ago

amihaiemil commented 7 years ago

@trautonen Hello,

I have a Maven multi-module project

-parent pom
    -- project A
    -- project B

In the parent pom.xml I declare the coveralls plugin and 2 maven profiles: 1 for jacoco, to run the prepare-agent and report and 1 for coveralls report that executes after the jacoco one is finished. The pom is here profiles are the last in the page.

Everything seems to work: jacoco works, I see the jacoco.xml generated under target/site/jacoco, the coveralls profile is triggered and executed, data reaches up on coveralls.io... however, aggregation seems to not be working, since in my recent builds report, I see 2 entries.. one for project A, and one for project B, when I would expect to see only 1 entry, right?

coveralls

What happens, I think, is that the coveralls profile gets executed for each project in turn, and doesn't run the aggergation algorithm.

Can you help me a bit, tell me what I'm not doing right?

Many thanks, Mihai Andronache

amihaiemil commented 7 years ago

I looked more into it and it was what I initially thought - the coveralls profile was being executed for each module and thus sending a report for each of them... I solved the issue by calling the coveralls:report after install directly and got rid of the profile