-
New Feature
-
Resolution: Unresolved
-
Major
-
None
We need an option to exclude complete Maven modules from the JaCoCo report.
I've tried it with an exclusion pattern like **/module-to-be-excluded/**, but this doesn't work. It seems that the JaCoCo plugin copies the classes from all modules into a new directory, so the module folder names are lost and cannot be used for filtering any more.
Filtering on package/class level would be very cumbersome because other modules in the build typically use similar package names.
Thanks a lot for your assistance!
Best Regards,
Jochen Ehret.
I have the same problem. The includes/excludes appear to be evaluated relative to the class directory. It is onerous and brittle to add specific exclusions on a package by package basis.
IMHO, rather than an option to exclude specific maven modules, the plugin should ignore un-instrumented class files.
This would address the problem without being maven specific. In the maven configuration, modules could then be excluded by configuring them to skip jacoco instrumentation...
<plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin>
... and code within modules to be excluded by configuring the agent to be more selective ...