<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.5.3.201107060350</version>
<executions>
<execution>
<id>JaCoCo Agent</id>
<phase>test-compile</phase>
<goals>
<goal>
prepare-agent
</goal>
</goals>
</execution>
<execution>
<id>JaCoCo Report</id>
<phase>test</phase>
<goals>
<goal>
report
</goal>
</goals>
</execution>
</executions>
</plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.5.3.201107060350</version>
<executions>
<execution>
<id>JaCoCo Agent</id>
<phase>test-compile</phase>
<goals>
<goal>
prepare-agent
</goal>
</goals>
</execution>
<execution>
<id>JaCoCo Report</id>
<phase>test</phase>
<goals>
<goal>
report
</goal>
</goals>
</execution>
</executions>
</plugin>
本文介绍如何通过Maven中的JaCoCo插件来实现Java项目的代码覆盖率测试。详细配置了JaCoCo插件的两个阶段:JaCoCoAgent用于准备代理,JaCoCoReport则负责生成报告。
1233

被折叠的 条评论
为什么被折叠?



