Conflicting sub-projects modules when using Maven

(Steve) #1

Hello SonarQube Community,

I hope someone can advise on how best to handle scanning two projects with identical modules in Maven. I have two projects that both use the same common code. In the Maven pom.xml file they both identify the same common-code names.

When the second project attempts a scan, it fails because the common-code module is already part of the first application scan that created.

Anyone have suggestions on a good way to resolve this - either in Maven or through SonarQube properties?

Thanks for the help!

I’m using 6.7.2.


(G Ann Campbell) #2


You will only be able to have that module analyzed as part of one project, not both. You’ll need to set up an exclusion for it in the project that you choose not to have it. If that’s the project you’ve already analyzed separately, then you’ll need to set up the exclusion and re-analyze before you can successfully analyze the other project.


(Steve) #3

Thank you, Ann!