在Jenkins中集成cobertura

来源:互联网 发布:电锯惊魂1解析 知乎 编辑:程序博客网 时间:2024/06/03 18:48

参考:

cobertura插件的官方文档:https://wiki.jenkins-ci.org/display/JENKINS/Cobertura+Plugin

 

在项目的POM.XML中增加如下:

<project   ....

  <build>
     ..... 

      <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <configuration>
                     <aggregate>true</aggregate>
                          <formats>
                             <format>xml</format>
                             <format>html</format>
                          </formats>
                 </configuration>

                <executions>
                     <execution>
                        <goals>
                            <goal>cobertura</goal>
                        </goals>
                     </execution>
                  </executions>

            </plugin>
         </plugins>
   </build>
 
</project>

 

 

 

原创粉丝点击