# Coverage missing from aggregate report in multi modules project

**URL:** <https://community.sonarsource.com/t/coverage-missing-from-aggregate-report-in-multi-modules-project/104204>\
**Category:** SonarQube Cloud\
**Tags:** multi-module, maven, sonarqube-cloud, java, coverage\
**Created:** [November 12, 2023, 4:16pm UTC](https://community.sonarsource.com/t/coverage-missing-from-aggregate-report-in-multi-modules-project/104204 "2023-11-12T16:16:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rabestro](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/rabestro/32/51457_2.png) [@rabestro](https://community.sonarsource.com/u/rabestro)\
**Post date:** [November 12, 2023, 4:16pm UTC](https://community.sonarsource.com/t/coverage-missing-from-aggregate-report-in-multi-modules-project/104204/1 "2023-11-12T16:16:26Z")

</div>

GitHub: [Add multi-module Maven project for Sonar and Jacoco setup by rabestro · Pull Request #1 · rabestro/test-sonar-multimodules · GitHub](https://github.com/rabestro/test-sonar-multimodules/pull/1)  
CI system used: GitHub Actions  
Scanner command used

```auto
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar 
          --batch-mode
          --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:

```auto
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:

> <https://github.com/rabestro/test-sonar-multimodules/pull/1>
>
> This commit introduces a multi-module Maven-based project setup, with different …modules for code, test code, and for generating aggregate reports. It modifies the project to accommodate a new setup where Sonar and Jacoco would be used for analysis and reporting. Two Maven modules 'module-code' and 'module-test' have been created along with test cases in them. Also, a 'aggregate-report' module is added to generate a consolidated report for better visibility. Some unneeded lines of code are removed from 'build.yml'. The changes are aiming at streamlining Static Code Analysis and Code Coverage processes.
> 
> 
> \## Summary by CodeRabbit
> 
> \- \*\*New Features\*\*
> - Introduced a new functionality in the application with the addition of the \`Foo\` class.
> \- \*\*Tests\*\*
> - Added new test cases to ensure the correct operation of the \`Foo\` class when both input numbers are positive.
> \- \*\*Chores\*\*
> - Modified the build process configuration, removing the project key for SonarQube analysis.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 14, 2023, 4:28pm UTC](https://community.sonarsource.com/t/coverage-missing-from-aggregate-report-in-multi-modules-project/104204/3 "2023-11-14T16:28:09Z")

</div>

Hi,

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](https://community.sonarsource.com/t/how-to-find-logs-about-importing-code-coverage/73317) will help you find them.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![meletis](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/meletis/32/65716_2.png) [@meletis](https://community.sonarsource.com/u/meletis)\
**Post date:** [January 9, 2025, 11:17am UTC](https://community.sonarsource.com/t/coverage-missing-from-aggregate-report-in-multi-modules-project/104204/4 "2025-01-09T11:17:43Z")

</div>

Hi,

I’m facing exactly the same issue and my project structure and configuration is 100% the same as yours. Were you able to find the solution to your problem?
