Maven multi-modules with SonarQube

Hello teams,

We have migrated from version v6.7 to a recent version of SonarQube v8.6.1.

However on a multi-module project configuration I noticed some strange behavior, on the source paths, JaCoCo and finally the way to declare ignore rules globally.

I have created a sample project if that helps: GitHub - ndywicki/sonar-multimodule-maven

This is a Maven multi-modules with a Spring Boot 2 backend an Angular frontend.

With this configuration I’ve noted a strange behavior since the concept of module have removed in the release 7.6 (ie MMF-365)

The is defined globally in the root of the project, and loaded with the Maven properties-maven-plugin.
The Angular frontend module is Mavenized with the frontend-maven-plugin.


  • SonarQube version: 8.6.1
  • SonarQube Maven plugging version:


Source paths frontend module

During the frontend module indexing the source paths is pom.xml instead of the global configuration sonar.sources=src/:

[INFO]   Base dir: /sonar-multimodule-maven/frontend
[INFO]   Source paths: pom.xml
[INFO]   Excluded sources: src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/classes/static/**/*.*

=> Only the pom.xml file as source path ?


Override the source paths for the frontend module in the pom properties or in a

<!-- Uncomment to override global sonar configuration to handle this module source... -->

JaCoCo is run for all child modules

Even if JaCoCo is not applicable for the frontend and parent modules, the sensor JaCoCo XML Report is running.

Especially for frontends we use the lcov report (via sonar.typescript.lcov.reportPaths)

[WARNING] No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths='target/jacoco/test/jacoco.xml,target/jacoco/integrationTest/jacoco.xml'. Using default locations: target/site/jacoco/jacoco.x

=> How to skip the JaCoCo sensor for some modules?

Define global ignore issue

For large projects or in the corporate world, a simple way to control what can
and cannot be ignored by project teams in reports is to use rules in a “super pom” or just in the parent pom.

Example to ignore globally the S3437 rule with the resourceKey rc/main/java/**/*:

# Rule is ignored, as a JPA-managed field cannot be transient

However, this raises warnings because it is necessary to specify all the relative paths:

[WARNING] Specifying module-relative paths at project level in property 'sonar.issue.ignore.multicriteria' is deprecated. To continue matching files like 'backend/src/main/java/com/example/myapp/backend/Backend', update this property so that patterns refer to project-relative paths.

I have noted the SONAR-11587 recommendations,
but in the context of a global “super pom” company configuration this is not applicable.
Do you have a solution ?

Thanks you for your help,


Hi @ndywicki,

Thank you for your message. Actually when you run analysis via maven scanner analysis is performed for each module separately, that’s why when analysing frontend module the base dir is sonar-multimodule-maven/frontend.

If I understood you correctly, you want to exclude frontend module from analysis? You can do it by setting <sonar.skip>true</sonar.skip> in the pom.xml of the frontend module as described here

If no, could you please clarify the result you want to achieve?


Hi @Margarita_Nedzelska ,

Thanks for your reply.
It’s the opposite, I want to include the frontend.
To sum up, in this case the source code of the frontend is ignored, it take sonar.sources = pom.xml
instead of /src.
I am forced to indicate the sonar.sources in the frontend module while it is not useful for the backend module.



First question is why not simply disabling the rule in your quality profile. Multicriteria exclusion is intended to exclude a specific rules on specific (subset of) files, while here it seems to me you want to exclude on all files.
Also you can try:


so that the path pattern will match project relative paths.

I think this is because the properties-maven-plugin only loads properties for the root module. They are not inherited. You should maybe declare those properties directly in the root pom?

If you want to investigate how the Scanner for Maven “see” properties, you can run:
mvn sonar:sonar and you will see in the file the properties for each modules.