Why does report-aggregate has 0% coverage?

86 views
Skip to first unread message

car...@redhat.com

unread,
Apr 11, 2019, 10:28:12 AM4/11/19
to JaCoCo and EclEmma Users
I'm trying to create a report-aggregate for my multi-module project, the only problem is that if use the goal report-aggregate I lose all the percentage. As shown in the image, during the same execution I get some coverage if I open the single module report, but there is no coverage if I open the aggregate report. I am using the report module, so I have this in /tests/pom.xml:

<plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.3</version>
        <executions>
                <execution>
                        <id>pre-unit-test</id>
                        <goals>
                                <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                                <destFile>${jacoco.ut.execution.data.file}</destFile>
                                <propertyName>surefireArgLine</propertyName>
                        </configuration>
                </execution>
        </executions>
</plugin>

And this is /tests/report/pom.xml, before the plugin there are all the dependencies to the modules:

<plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
                <execution>
                        <id>report-aggregate</id>
                        <phase>verify</phase>
                        <goals>
                                <goal>report-aggregate</goal>
                        </goals>
                </execution>
        </executions>
</plugin>

I've also tried with merge and with report after merge, but I always get the same cumulative report with all the modules but no coverage.
Does anyone know what's wrong?

aggregate-notaggregate.png

Marc Hoffmann

unread,
Apr 11, 2019, 10:34:20 AM4/11/19
to JaCoCo and EclEmma Users
Hi,

you configured a custom location for your exec files:

<destFile>${jacoco.ut.execution.data.file}</destFile>

By default the report-aggregate goal picks exec files from target/*.exec

Maybe configuration needs to be adjusted here? See documentation: https://www.jacoco.org/jacoco/trunk/doc/report-aggregate-mojo.html#dataFileIncludes

If you click on the “Sessions” link on the top right corner, you will see wich execution data was loaded for the report. Also the build log will tell you.

Regards,
-marc


--
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/edd49058-ebea-42d6-962c-d24246a710db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<aggregate-notaggregate.png>

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages