Coverage missing from aggregate report in multi modules project

GitHub: Add multi-module Maven project for Sonar and Jacoco setup by rabestro · Pull Request #1 · rabestro/test-sonar-multimodules · GitHub
CI system used: GitHub Actions
Scanner command used

mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar 
          --define sonar.projectKey=rabestro_test-sonar-multimodules

Languages of the repository: java

The project has three modules:

  • module-code: only source code without tests
  • module-test: unit test for module-code
  • aggregate-report: pom file to aggregate code coverage data

The sonar successfully import the XML file from aggregate-report module:

2023-11-12T15:50:54.9619120Z [INFO] ------------- Run sensors on module aggregate-report
2023-11-12T15:50:55.0140474Z [INFO] Sensor JaCoCo XML Report Importer [jacoco]
2023-11-12T15:50:55.0166474Z [INFO] Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
2023-11-12T15:50:55.0210480Z [INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=7ms

However, there is no coverage information.

Please see the pull request:


Welcome to the community!

Can you provide the full analysis log or point is to it?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.