App1 (pom)
app1-common (jar)
app1-core (jar)
app1-webapp(war) - Contains java code
App2 (pom)
app2-common(jar)
app2-core(jar)
app2-webapp(war) - Contains no java code
app2-common(jar)app2-core(jar)
App1 (pom)
app1-common (jar)app1-core (jar)app1-webapp(war) - Contains java code
App2 (pom)
app2-common(jar)app2-core(jar)
app2-common
app2-core
<jacoco.skip>true<jacoco.skip>
<maven.test.skip>true</maven.test.skip>
app2-common(jar)app2-core(jar)
app2-common(jar)app2-core(jar)
--
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 jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/7dfb7294-8f79-4751-8c37-449dad009167o%40googlegroups.com.
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<configuration>
<destFile>${sonar.jacoco.reportPaths}</destFile>
<append>true</append>
</configuration>
<executions>
<execution>
<id>agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<phase>test</phase>
<goals>
<goal>report-aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
To unsubscribe from this group and stop receiving emails from it, send an email to jac...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/dce20da3-57b8-4509-b749-9643b027ac73o%40googlegroups.com.
You’re using report-aggregate. This goal requires as separate module for the report. Please see documentation:On the other hand if you use Sonar with exec files there is no need to create reports at all.Regards,-marc
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/dce20da3-57b8-4509-b749-9643b027ac73o%40googlegroups.com.
The issue appears not to be in Jacoco but instead in SonarQube. In the failed scenario and the workaround scenario we discovered the appended jacoco.exec is exactly the same.
Even if a child pom uses a different groupId from its parent if the artifactid name is the same the code coverage will disappear for all child modules.
In app/pom.xml Changing
<parent>
<groupId>org.free2create.jacoco.mvp.reports</groupId>
<artifactId>app-reports</artifactId>
<version>7776.0.0.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<groupId>org.free2create.jacoco.mvp.app</groupId>
<artifactId>app-reports</artifactId>
To
<parent>
<groupId>org.free2create.jacoco.mvp.reports</groupId>
<artifactId>app-reports</artifactId>
<version>7776.0.0.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<groupId>org.free2create.jacoco.mvp.app</groupId>
<artifactId>app-reports-app</artifactId>
Works around the issue for the created demo code and in our real application.
The Issue appears in a 3 level pom but not a 2 level pom:
Can reproduce
Top level(pom)
Middle (pom)
core(pom)
app(war)
Will not reproduce.
Top level(pom)
core(pom)
app(war)