Change projectName for already existing project

We run SonarQube analysis from Jenkins
There is sonar.properties file and some parameters we provide in command line

For the first run we run SQ scan with -Dproject.settings=sonar.properties -DprojectName=test1 -DprojectKey=test_test
And in web UI we can see project name ‘test1’

when we want to change the name and run SQ scan with -Dproject.settings=sonar.properties -DprojectName=test2 -DprojectKey=test_test
In web UI we still see project name ‘test1’

Only when we change also projectkey we can see a new project name (since it probably creates new project in db)
scan with -Dproject.settings=sonar.properties -DprojectName=test2 -DprojectKey=test_test2

Hello @mkon4022,

This should work except that the parameters are sonar.projectKey and sonar.projectName, not projectKey and projectName.

Olivier

PS: This is an unrelated comment: Using sonar.properties for the project configuration file is not a good idea. It’s confusing with the SonarQube server side main configuration file (whose name is sonar.properties).
The default project configuration file is sonar-project.properties and I don’t see any good reason to change it to another name.