How to generate Cobertura Code Coverage Report using Maven from Hudson

stackoverflowsk picture stackoverflowsk · Jan 5, 2010 · Viewed 59.4k times · Source

In my project I need to create Cobertura Code Coverage report from Hudson using maven build.
In Hudson I have added the Cobertura Code Coverage plugin.
I need the complete modification steps of pom.xml.

Answer

ewernli picture ewernli · Jan 5, 2010

Did you try to add this to your pom.xml in the reporting section?

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

Complete configuration steps can be found here.