使用ignoreTrivial
選項,可以從代碼覆蓋率中排除安裝者和吸氣者。 jacoco-maven-plugin
也有這種可能嗎?在JaCoCo代碼覆蓋範圍內排除安裝者和吸氣者
這是我目前的配置:
<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'尋找答案嗎? – 2015-04-26 03:26:32
是的,我仍然在尋找答案! :-) – 2015-04-26 07:10:34