mavenhudsoncobertura

How to generate Cobertura Code Coverage Report using Maven from Hudson


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.


Solution

  • 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.