How to handle "all-tests-in-one-module"?

14 views
Skip to first unread message

Mark Raynsford

unread,
Oct 30, 2017, 1:23:42 PM10/30/17
to jac...@googlegroups.com
Hello.

My Maven projects tend to be multi-module, and all tests are placed
inside a single "tests" module rather than having them spread all over
the project's modules. Here's a drastically simplified illustration of a
project (including the full output of "mvn clean verify"):

https://github.com/io7m/jacoco-20171030

The problem: The JaCoCo maven plugin skips its own execution because it
can't find a "classes" directory:

[INFO] --- jacoco-maven-plugin:0.7.9:report (jacoco-report) @com.io7m.jacoco.20171030.tests ---
[INFO] Skipping JaCoCo execution due to missing classes directory.

Is there some way I can tell JaCoCo how to find the rest of the
project's classes? Bear in mind that in my real projects, there may be
dozens of modules each containing classes.

--
Mark Raynsford | http://www.io7m.com

Marc Hoffmann

unread,
Oct 30, 2017, 4:27:15 PM10/30/17
to jac...@googlegroups.com
Hi,

for this scenario we created the report-aggregate goal:

http://www.jacoco.org/jacoco/trunk/doc/report-aggregate-mojo.html

Regards,
-marc

Mark Raynsford

unread,
Oct 30, 2017, 5:21:22 PM10/30/17
to jac...@googlegroups.com
On 2017-10-30T21:27:12 +0100
Marc Hoffmann <hoff...@mountainminds.com> wrote:
>
> Hi,
>
> for this scenario we created the report-aggregate goal:
>
> http://www.jacoco.org/jacoco/trunk/doc/report-aggregate-mojo.html
>

Thanks! I somehow overlooked that one. It appears to work! I've updated
the original example with it, for visitors from the future.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages