java - How to ignore inner/nested classes with JaCoCo? -
i'm trying ignore generated classes, , classes ignored fine. if classes have inner classes, classes still included, despite parent class being excluded. configuration:
<plugin> <groupid>org.jacoco</groupid> <artifactid>jacoco-maven-plugin</artifactid> <version>0.7.9</version> <executions> <execution> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>report</id> <phase>prepare-package</phase> <goals> <goal>report</goal> </goals> <configuration> <excludes> <exclude>**/*db.*</exclude> <exclude>**/*dto.*</exclude> </excludes> </configuration> </execution> </executions> </plugin>
attempting use standard java name convention of parentclass.nestedclass excluding **/*db.*.*
did not help.
after searching, found answer myself. wasn't googleable, i'm putting here posterity's sake:
the syntax mirrors of compiled java naming convention:
<configuration> <excludes> <exclude>**/*db.*</exclude> <exclude>**/*db$*.*</exclude> <exclude>**/*dto.*</exclude> <exclude>**/*dto$*.*</exclude> </excludes> </configuration>
wiki
Comments
Post a Comment