Hi,

I am trying to generate code coverage report for our multi-module maven
project using cobertura. After I run mvn package, in one of the modules
from where we run JUnit tests, the coverage report is correct as expected.

However, coverage report generated in the other
<module-name>/target/site/cobertura directories is reported as zero for
both line and branch coverage.

Am I missing something, in my parent POM, I have not made any changes to
any of the child POMs in the <module-name> directories. Please let me know
how to generate the code coverage report for a multi module maven project
using cobertura.

Here is how my parent POM looks like.

<plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>cobertura-maven-plugin</artifactId>
                            <version>2.5.1</version>
                             <configuration>
                                <formats>
                                    <format>html</format>
                                    <format>xml</format>
                                </formats>
                             </configuration>
                             <inherited>true</inherited>
                             <executions>
                                 <execution>
                                     <phase>package</phase>
                                         <goals>
                                             <goal>cobertura</goal>
                                         </goals>
                                 </execution>
                             </executions>
                        </plugin>

...
<dependencies>
    <dependency>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.5.1</version>
        <type>plugin</type>
        <scope>package</scope>
    </dependency>
    </dependencies>

Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to