mysqlmavensonarqubesonarqube-scansonarqube5.6

Sonar complains that a project is already defined in SonarQube but not as a module of project


After upgrading from SonarQube 5.1.2 to SonarQube 5.6, we started facing the below issue.

ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVX_lJ9fzEKnCGDDOpXH org.sonar.api.utils.MessageException: Validation of project failed: The project 'X' is already defined in SonarQube but not as a module of project "Y". If you really want to stop directly analysing project "X", please first delete it from SonarQube and then relaunch the analysis of project "Y".

We haven't done any changes or refactored our code apart from upgrading. please let us know how to fix the issue.


Solution

  • Sharieff,

    I had faced a similar situation in my project. For me it was the sonar.skippedModules property which was still mentioned in my pom.xml. Since this property is no more supported since SonarQube 5.5, SonarQube may have problems analyzing the modules as they already would have entries in the database.

    Hope this helps.

    Regards, Anantha