Is the dataFile parameter ignored?

1,013 views
Skip to first unread message

hen...@dohlmann.dk

unread,
Mar 6, 2015, 11:05:22 AM3/6/15
to jac...@googlegroups.com
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>

rof...@gmail.com

unread,
Aug 11, 2015, 9:55:20 AM8/11/15
to JaCoCo and EclEmma Users, hen...@dohlmann.dk
Seems to me it's broken:

[INFO] --- jacoco-maven-plugin:0.7.2.201409121644:report-integration (report-integration-test) @ a-project ---
[INFO] Skipping JaCoCo execution due to missing execution data file:(a path\target\jacoco-it.exec

My pom.xml is configured as follows:

<execution>
<id>report-integration-test</id>
<phase>verify</phase>


<goals>
<goal>report-integration</goal>
</goals>
<configuration>

<dataFile>${project.basedir}/target/jacoco.exec</dataFile>
<outputDirectory>${project.basedir}/target/coverage-reports</outputDirectory>
</configuration>
</execution>

Evgeny Mandrikov

unread,
Aug 11, 2015, 3:44:32 PM8/11/15
to JaCoCo and EclEmma Users, hen...@dohlmann.dk, rof...@gmail.com
Hi,

For me it seems working - made a quick test in https://github.com/Godin/jacoco/tree/test-report-integration-dataFile
So could you please provide full log or even better small project, which reproduces your issue?

Best regards,

rof...@gmail.com

unread,
Aug 19, 2015, 3:17:06 AM8/19/15
to JaCoCo and EclEmma Users, hen...@dohlmann.dk, rof...@gmail.com
Sorry for the delay,

build a new example to proof my problems, and then it's working!
Seems my initial setup has some flaws, jacoco is working fine.

Thanks for your work and effort!

Let's go debugging (2000 line pom, multimodule, ...).
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages