参考:
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>