Unable to update project name via sonar.projectName property

I have a project in our SonarQube instance. For some reason, I want to rename the project via sonar.projectName parameter.

In the document, sonar.projectName is describes that:

If not provided and there is already a name in the DB, it won’t be overwritten.
Analysis parameters

But I couldn’t rename the project via mvn sonar:sonar -Dsonar.projectName=newName.

In the source code, the sonar.projectName parameter is described that:

Optional name of the project, used only if the project does not exist yet.
sonarqube/SubmitAction.java at bcd75f36ce26a17eeea53b392215414b2ba9c000 · SonarSource/sonarqube · GitHub

Which is correct? Is it not possible to change the project name without recreating the project?

Our environment:

  • SonarQube Community 9.9.0 deployed from zip
  • SonarScanner for Maven (sonar-maven-plugin):


Those docs also say:

<name> for Maven projects

Is it possible that you provided -Dsonar.projectName once on the command line, and it was renamed until your next analysis? Because with a Maven analysis, your pom <name> value will be automatically passed at each analysis.

Maybe just update the <name> element in your POM?