Hi Philip,

many thanks for taking the time to implementing this and lettung us know.

May I ask you to create a pull request from your fork against jacoco/jacoco? So we can properly discuss adoption at Github.

Regards,
-marc

On 2015-08-13 19:27, [email protected] wrote:
I was working on a recent multi-module maven project where the unit
tests are in a different module from the codes being tested.  I
noticed that is also the same structure that JaCoCo uses.

The only way that I could get Maven to generate a coverage report with
JaCoCo was to use an ant task (org.jacoco.ant.ReportTask) within
Maven, which always feels a little smelly to me, where I explicitly
listed each and every module that contained code that I wanted to
check for coverage on.

Whilst this worked I was unhappy with the size and brittleness of the
resultant pom file.

So I have created a fork which added support for using Maven's reactor
projects (there is a configuration option which has to be set before
the changes will alter the behaviour of JaCoCo) to determine the set
of directories (as opposed to just the current project's) to be
included in the report:

    https://github.com/prgp/jacoco/tree/prgp-fix-multi-module-reports

The only significant issue with this is that you must build the entire
project (ie you cannot use -pl or -rf).  It also obviously does not
include any support for (additional) source directories to be added,
but that would be a relatively simple addition if someone wanted that.
 I have only tested the above under Maven 3 as the project in question
requires it.

I was wondering whether there are any plans to include something like
this on the roadmap for JaCoCo ?

        Philip

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/57b26d8eaaa5cbbabbcd4a2a3b4deaed%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to