Maven Tycho + Jacoco: no coverage of tested classes

244 views
Skip to first unread message

thomas.lo...@gmail.com

unread,
Nov 27, 2014, 3:10:26 PM11/27/14
to jac...@googlegroups.com
Hi all,

I have a set of Eclipse plugins that are compiled using the Maven Tycho plugin. Following the "Eclipse convention", tests are located in a separate module (a bundle fragment) than the tested classes. E.g. If you have a "plugin1" module than the test classes are in a separate "plugin1-test" module.
The problem I have with Jacoco is that when I execute "mvn clean verify site", the coverage report generated for the "plugin1-test" only includes the coverage of the test classes (and not the tested classes), and no coverage report is generated for "plugin1".
I googled around and found a couple of other people having the same problem, but I wasn't able to find a solution.
Can anyone help me please?
Thank you.

Thomas

Marc R. Hoffmann

unread,
Nov 27, 2014, 10:31:57 PM11/27/14
to jac...@googlegroups.com
Hi Thomas,

we have the exact same problem for the JaCoCo build: JaCoCo does not yet
support multi-module or cross-module code coverage.

What we do is to generate a combined report in a separate module using
the antrun goal, see
https://github.com/jacoco/jacoco/blob/master/org.jacoco.doc/pom.xml#L76

Cheers,
-marc

thomas.lo...@gmail.com

unread,
Nov 28, 2014, 2:09:58 AM11/28/14
to jac...@googlegroups.com
Hi Marc,

Thank you for the tip. It's quite complex and burdensome but if there is currently no other solution I will try that.
Do you know if this "cross-module-coverage" feature is on the Jacoco roadmap?

Thomas

Marc Hoffmann

unread,
Nov 28, 2014, 2:26:08 AM11/28/14
to jac...@googlegroups.com
We have a feature request for it, but currently nobody is working on this.

Regards,
-marc
> --
> 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 jacoco+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/e4c6e155-71c6-4403-83d3-23ebdcc47019%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages