-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent includes/excludes options for Maven report goal #34
Comments
These are the different notations for classes we have:
Agent Parameters, Ant tasks and Maven prepare-agent goal
These specifications allow wildcards * and ?, where * wildcards any number of characters, even multiple nested folders. Maven report goalincludes: File Name These specs allow Ant Filespec like wildcards |
+1 |
1 similar comment
+1 |
+1 <plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>com.mycompany.ignore_this.*</exclude>
</excludes>
</configuration>
</plugin> I also tried to exclude it in the |
@spaceCamel The
|
@marchof thanks for pointing that out again. Indeed if I put |
+1 |
@Godin do you have any idea, how to fix this? |
Did anyone find a solution for this ? |
When i tried the parameter in "report" goal, it dose not work. When I change the parameter in "prepare-agent" goal, it works. Not sure why this happens. |
@marchof Hi, is there any solution to excluding packages/classes in a JaCoCo report yet? |
@obol007 If you specify patterns for CLASS FILES this should work, like your last exclude:
I assume it does not work due to the whitespace at the end. |
@marchof I moved |
Only thing that worked for me is to
Took the sample from here. This will apply to all executions, i.e. it'll be excluded from <plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>com/mycompany/ignore_this/*</exclude>
<!-- wildcard "**" also works -->
<!-- <exclude>**/ignore_this/*</exclude> -->
</excludes>
</configuration>
<executions>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin> Works with |
The solution that worked for me is to do the following
Works with |
For the JaCoCo agent, Ant Tasks and Maven goals the format of the class names to include/exclude needs to be properly specified.
Also the change log for 0.5.4 probably shows the wrong format.
The text was updated successfully, but these errors were encountered: