How do I get code-coverage component (Emma) from Sonar to ignore parent module?

246 views Asked by At

I have a multi module project which I'm analyzing with Sonar + Emma (Code Coverage) / Arquillian. If I run

mvn clean install
mvn sonar:sonar 

on each of the Modules separately, everything works fine. However when I run it from the Main Parent Module it fails since emma somehow tries to get that coverage on it and for some reason it fails. Parent looks like:

<groupId>com.parent</groupId>
<artifactId>parent-build</artifactId>
..
<packaging>pom</packaging>
...
<modules>
    <module>Module A</module>
    <module>Module B</module>
    <module>Module C</module>
</modules>
...
mvn clean install -Dskiptests=true 
mvn sonar:sonar

When sonar gets to "parent-build" and tries to use emma for coverage it throws this exception:

Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.1:sonar
(default-cli) on     project parent-build: Can not execute Sonar
... 
root cause is
IllegalStateException: source file data view requested for metadata 
with incomplete    SourceFile debug info at
com.vladium.emma.report.ReportDataModel.getView(ReportDataModel.java:49)

I've tried getting sonar to skip that module but it needs the root module for its stats. I need to somehow get sonar-maven-plugin to stop using emma when it gets down to the parent.

What should I try to do to get that working?

0

There are 0 answers