Description
openedon Jun 3, 2024
Describe the bug
Most of our repos are structured as multi-module repos. Some modules are quarkus-services, some are only libs which are shared between the quarkus-services. Every module had the jacoco-maven-plugin and I want to migrate to the quarkus-jacoco plugin. Additionally we have a sonarqube instance which reports our test coverage.
I have some issues during migration (not finding tests for example) therefore I tried it with a minimal project setup, which can be found here: https://github.com/hamburml/multi-module-test-coverage and it works - for each module. After mvn verify
I find all reports located in target/jacoco-report (which I think I will change to target/site because that is the defacto default location if I remember. I need to make sure that sonarqube finds the report).
But now I want to aggregate every report to a big "repository report". I used https://quarkus.io/guides/tests-with-coverage#working-with-multi-module-projects the following config, pasted it in the parent pom and after mvn verify
all reports are gone.
Expected behavior
every module should have a target/jacoco-report folder and the parent target/coverage folder should be aggregated module reports.
Actual behavior
After
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<quarkus.jacoco.data-file>${maven.multiModuleProjectDirectory}/target/jacoco.exec</quarkus.jacoco.data-file>
<quarkus.jacoco.reuse-data-file>true</quarkus.jacoco.reuse-data-file>
<quarkus.jacoco.report-location>${maven.multiModuleProjectDirectory}/target/coverage</quarkus.jacoco.report-location>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
is added to the parent pom all reports are gone
How to Reproduce?
- clone https://github.com/hamburml/multi-module-test-coverage
- mvn verify
- check reports
- add maven-surefire-plugin to parent-pom as shown in guide https://quarkus.io/guides/tests-with-coverage#working-with-multi-module-projects
- mvn verify
- reports gone
Output of uname -a
or ver
No response
Output of java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version
or gradlew --version
)
No response
Additional information
No response