I am trying to produce a merged coverage report of a multi-module project.
But, it seems that the dataFile parameter of the report and report-integration 
goal is ignored.

I can see that the jacoco.exec and jacoc-it.exec files are merged into the 
target folder of the root module. But, when I run mvn site, I get the following 
output:

[INFO] Skipping JaCoCo execution due to missing classes 
directory:C:\Projects\root\target\classes
[INFO] Skipping JaCoCo execution due to missing classes 
directory:C:\Projects\root\target\classes

Fair enough. This is the parent pom. It has no source and therefore no classes.

[INFO] Skipping JaCoCo execution due to missing execution data 
file:C:\Projects\root\child\target\jacoco.exec
[INFO] Skipping JaCoCo execution due to missing execution data 
file:C:\Projects\root\child\target\jacoco-it.exec

Not fair... Why isn't it looking for the *.exec files in the configured path?

Am I doing something wrong?


Snippet of pom file:
<properties>
        <jacoco.version>0.7.4.201502262128</jacoco.version>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        
<sonar.jacoco.reportPath>${project.parent.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
        
<sonar.jacoco.itReportPath>${project.parent.basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
</properties>
...
<plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <configuration>
                <append>true</append>
        </configuration>
        <executions>
                <execution>
                        <id>agent.test</id>
                        <goals>
                                <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                                <propertyName>jacoco.test</propertyName>
                                <destFile>${sonar.jacoco.reportPath}</destFile>
                        </configuration>
                </execution>
                <execution>
                        <id>agent.it</id>
                        <goals>
                                <goal>prepare-agent-integration</goal>
                        </goals>
                        <configuration>
                                <propertyName>jacoco.it</propertyName>
                                
<destFile>${sonar.jacoco.itReportPath}</destFile>
                        </configuration>
                </execution>
                <execution>
                        <id>report.test</id>
                        <goals>
                                <goal>report</goal>
                        </goals>
                        <configuration>
                                <dataFile>${sonar.jacoco.reportPath}</dataFile>
                        </configuration>
                </execution>
                <execution>
                        <id>report.it</id>
                        <goals>
                                <goal>report-integration</goal>
                        </goals>
                        <configuration>
                                
<dataFile>${sonar.jacoco.itReportPath}</dataFile>
                        </configuration>
                </execution>
        </executions>
</plugin>

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/64543017-1649-495c-93b1-107ae7302570%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to