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
Certainly, the associated pull request is: