How to view HTML coverage report using Cobertura Maven plugin?

Have a look at the plugin's documentation, there's an example. Pretty sure that you have to add a <reporting> element to actually produce the report.


This in the Build section:

<build>
    ...
    <plugins>
        ...    
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.5.2</version>
        </plugin>
        ...
    </plugins>
    ...
</build>

And then this in the Reporting section:

<reporting>
    ...
    <plugins>
        ... 
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.5.2</version>
            <configuration>
                <check></check>
                <formats>
                    <format>html</format>
                    <format>xml</format>
                </formats>
            </configuration>
        </plugin>
        ...
    </plugins>
    ...
</reporting>

Execute mvn cobertura:cobertura

Then look for index.html inside the target/site/cobertura/ folder.