Rename an existing projectName in SonarQube 10.2


We’re using SonarQube 10.2, and run CICD from Github Action with latest ubuntu runner.

For reason, we would like to rename an existing projectName, we can easily rename the projectKey from the web UI, but we can not find the same thing to rename project Name.

When searching on the internet, especially in this community, someone said that we just need to send the param -Dsonar.projectName=[new_name] when using the scanner, but it seems that it does not work, we’re sure that the param is correctly received by Sonar scan, as we can see the result in sonar.scanner.dumpToFile.

Could you please provide the tuto how to rename an existing projectName.

Hereunder an example how we use the scanner action:

- name: SonarQube Scan
  uses: sonarsource/sonarqube-scan-action@master
    SONAR_HOST_URL: ${{ inputs.sonar-host-url }}
    SONAR_TOKEN: ${{ inputs.sonar-token }}
    args: >
      -Dsonar.projectKey=${{ inputs.sonar-project-key }}
      -Dsonar.projectName=${{ inputs.sonar-project-name }}


Where you analyzing your main branch? Naming change only works during analysis of the main branch.