【发布时间】:2014-10-24 21:23:57
【问题描述】:
使用cobertura-maven-plugin,可以使用ignoreTrivial 选项将setter 和getter 排除在代码覆盖范围之外。 jacoco-maven-plugin也有这种可能吗?
这是我当前的配置:
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.1.201405082137</version>
<configuration>
<excludes>
<exclude>com/welovecoding/web/blog/test/**/*.class</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>amend-unit-test-java-agent-option</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
【问题讨论】:
-
你还在寻找答案吗,可能是
Gradle? -
是的,我还在寻找答案!! :-)
-
当你有包时
some/package/model/**/* 和some/package/dto/**/* 怎么样包含大部分琐碎的代码?
标签: code-coverage setter getter jacoco jacoco-maven-plugin