我试图忽略一些生成的类,并且这些类被很好地忽略。但是,如果这些类具有内部类,则尽管父类被排除,但这些类仍然会被包含在内。这是我的配置:
<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>
尝试通过排除来使用 ParentClass.NestedClass 的标准 Java 名称约定**/*DB.*.*
没有帮助。
经过一番搜索,我自己找到了答案。由于它不容易通过谷歌搜索,为了后代,我将其放在这里:
语法反映了compiledJava命名约定:
<configuration>
<excludes>
<exclude>**/*DB.*</exclude>
<exclude>**/*DB$*.*</exclude>
<exclude>**/*DTO.*</exclude>
<exclude>**/*DTO$*.*</exclude>
</excludes>
</configuration>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)