Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonar: "Module is already part of project" or How to upload projects with same dependencies?

I have two projects (A and B), which use the same reusable module (C). I upload A into sonarqube without problems, but when I upload B, the sonar-maven-plugin tells me that Module C is already part of project A. How can I fix it? I want both of my projects to be uploaded into sonarqube.

like image 799
cynepnaxa Avatar asked Aug 26 '14 08:08

cynepnaxa


1 Answers

  • If you´re Sonar admin go to http:///background_tasks and select excecution log. You have the following error:
2016.11.18 08:56:08 ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task XXXXXX
org.sonar.api.utils.MessageException: Validation of project failed:
  o Module "moduleA" is already part of project "org.company:proj2"
  • So you have to edit the MODULE pom.xml in your project proj1, and say it to Sonar that this module will be named as:
<properties>
    <sonar.moduleKey>org.company:proj2:moduleA-NEW</sonar.moduleKey>
</properties>
like image 150
Matias Burni Avatar answered Oct 06 '22 09:10

Matias Burni