androidjenkinssonarqubesonar-runnersonarqube-4.5

Duplicating sonar project names in the Name list in Sonarqube dashboard


enter image description here

I'm using sonarqube version 5.2 - LGPL v3 to test some android projects.

I did my testing with both sonar way and Android Lint ways.And all the running tasks have been integrated with the Jenkins automation system. And My problem is sometimes the sonarqube duplicated the project name and show the new version as a new project in the sonar dashboard (see the screen shot of the sonar dashboard).Repeat same in the list without overriding same project results. How do I prevent this?. And I have added my android gradle code here.

apply plugin: 'org.sonarqube'

sonarqube {

properties  {
    property "sonar.projectName", "W40 Sonar Way"
    property "sonar.host.url", "http://**.***.***:9000/sonar"
    property "sonar.sources", "src/main/java"
    property "sonar.import_unknown_files", "true"
    property "sonar.language", "java"
    property "sonar.profile", "Sonar way"
    property "sonar.android.lint.report", "/data/jenkins/workspace/SonarJobs/erSonar/w40/build/outputs/lint-results-debug.xml"
}

}


Solution

  • There's nothing in SonarQube that prevent many projects to have the same name, if project keys are not the same. You should check your gradle configuration that you're always using the same key for the same project.