<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/package1/subpackage/*</exclude>
</excludes>
</configuration>
</plugin>
我想忽略某个包下的所有类。我正在运行eclipse中给出的代码覆盖选项。如果有任何错误,请评论
这里是jacoco-maven插件的includes
和exclude
配置的一个工作示例。
所有在其is包中包含jacocodemo的类都包含在内,除非它们中有jacocodemo/string。
<execution>
<id>jacoco-report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<includes>
<include>**/jacocodemo/**/*</include>
</includes>
<excludes>
<exclude>**/jacocodemo/strings/*</exclude>
</excludes>
</configuration>
</execution>