Sonarqube doesn't rename a project for which the main branch has no analysis


  • Sonarqube 9.9-LTS ( deployed on docker
  • Sonar Scanner

I try to rename (via the definition of sonar.projectName property) the name of a project. If the project doesn’t have a main branch analysis, Sonarqube doesn’t rename the project.

Steps to reproduce:

  1. execute a branch analysis in the project : sonar-scanner.bat “-Dsonar.projectName=albator” “-Dsonar.projectKey=sbtest.092023” “-D” “”
  2. consult the project in Sonarqube, it has the right name “albator”
  3. execute another analysis with a new projectName to rename the project in Sonarqube : sonar-scanner.bat “-Dsonar.projectName=cobra” “-Dsonar.projectKey=sbtest.092023” “-D” “”
  4. consult the project in Sonarqube, it has the old name “albator” and not the new name

Seems to be a bug, doesn’t it ?

Filed as SUPPORT-42274

Hey there.

We don’t consider it a bug – it’s known behavior that to update the project name, the project name must be passed to an analysis of the main branch. We’d prefer there to be one source of truth, instead of the analysis of any random branch being able to change it for everyone.

It seems a reasonnable option. But where is it documented ?

Fair. I’ll ping our Docs team to see if we can find a place for it.

Hi Frédéric, thank you for pointing this out.
I will create a ticket in order to add this information to the documentation.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.