views:

785

answers:

1

Hi Friends
In my project I need to create Cobertura Code Coverage report from Hudson using maven build. In Hudson I haved added the Cobertura Code Coverage plugin.
I need the complete modification steps of pom.xml.
Please help me.
Thanks

+4  A: 

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: http://wiki.hudson-ci.org/display/HUDSON/Cobertura+Plugin

ewernli
I have added configuration under section 'Execute cobertura only from hudson using profiles' available at 'http://wiki.hudson-ci.org/display/HUDSON/Cobertura+Plugin' in my pom.xml Also added the configuraiton under 'reporting' tag for cobertura-maven-pluginBut while executing the build from hudson - I am getting the following exceptionSkipping Cobertura coverage report as build was not UNSTABLE or better ... Finished: FAILUREI have configured the plugin "Publish Cobertura Coverage Report" in HudsonAm I missing any steps during configuration?
stackoverflowsk

related questions