I have a multi module project where I use Quarkus. In all the modules, I have written tests that all are succeeding. I want to see my code coverage in a self-hosted SonarQube instance. When I run ./mvnw verify, the target folder is being generated and is filled with the code coverage, all in different folders.
When using the jacoco.exec file in IntelliJ, I can see the fact that the code coverage does seem to work. But, since SonarQube doesn't support the binary format of Jacoco anymore, it needs to have the XML format.
The XML format of Jacoco seems like it only has the last module in the generated list. This is shown in the CSV file that is generated with Jacoco. During the verify command, the CSV file changes the content to the module it is currently working on and overwrite the old ones. The content of the CSV file and the XML file do match.
Expected behavior
Within in multi-module project, the XML file is overwritten with the module that it is building on that moment. Which means, at the end of the build, the XML file only holds code coverage information about the last in the build line.
Actual behavior
An XML file that is filled with all the modules code coverage in one file. This needs to be in one file because SonarQube only accepts one XML file as its code coverage source.
Describe the bug
I have a multi module project where I use Quarkus. In all the modules, I have written tests that all are succeeding. I want to see my code coverage in a self-hosted SonarQube instance. When I run
./mvnw verify
, the target folder is being generated and is filled with the code coverage, all in different folders.When using the jacoco.exec file in IntelliJ, I can see the fact that the code coverage does seem to work. But, since SonarQube doesn't support the binary format of Jacoco anymore, it needs to have the XML format.
The XML format of Jacoco seems like it only has the last module in the generated list. This is shown in the CSV file that is generated with Jacoco. During the verify command, the CSV file changes the content to the module it is currently working on and overwrite the old ones. The content of the CSV file and the XML file do match.
Expected behavior
Within in multi-module project, the XML file is overwritten with the module that it is building on that moment. Which means, at the end of the build, the XML file only holds code coverage information about the last in the build line.
Actual behavior
An XML file that is filled with all the modules code coverage in one file. This needs to be in one file because SonarQube only accepts one XML file as its code coverage source.
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
Quarkus version or git rev
3.12.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven home: /Users/rickverkuijlen/.m2/wrapper/dists/apache-maven-3.9.6-bin/3311e1d4/apache-maven-3.9.6 Java version: 21.0.3, vendor: Eclipse Adoptium, runtime: /Users/rickverkuijlen/.sdkman/candidates/java/21.0.3-tem Default locale: en_NL, platform encoding: UTF-8 OS name: "mac os x", version: "14.5", arch: "aarch64", family: "mac"
Additional information
No response