Change a project name is not working

Good afternoon,

I ask you a question on this subject.

I am wanting to rename projects with the following command:
sonar-scanner $ SONAR_CLI_VARS -Dsonar.verbose=true -Dsonar.projectName=<new_project_name>

But even though I get the following message in the gitlab log, I don’t see it reflected in the project name.
POST 200 http: // <sonar_host & Port> / api / ce / submit? ProjectKey = trialbite & projectName = trialbiteAdo & characteristic = branch% 3Ddevelopment & characteristic = branchType% 3DBRANCH | time = 25ms

Tools version:
Gitlab: 13.6.3-ee (8578025c5e8)
Sonarqube: Enterprise EditionVersion 8.5.1
Sonar-scanner: SonarScanner 4.5.0.2216 (dockerimage last version)

I await a prompt reply.

Thanks and regards

Hello @Rodrigo_Adonis_Maxim,

Welcome to the SonarSource community. :wave:. I hope you’ll like it.

The change of project name only works when you analyze the project main branch (most often master) ie when you run a scan without the property sonar.branch.name or sonar.pullrequest.key set.
In your case, from the POST, it’s clear that you passed sonar.branch.name=development.
Indeed with GitLab-CI (if that’s what you are using) the sonar.branch.name is set automatically so you may not notice.
Bottomline, to change the project name you have to analyze your master branch.

Well, this is community support so you have also to be patient. We’re doing our best to provide free assistance, but we have also a lot to do elsewhere. I hope you understand.

:christmas_tree: Merry Christmas :christmas_tree:

Olivier

1 Like

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