JaCoCo和Maven的集成方式,在开发者测试阶段自动生成覆盖率报告

    <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,测试)