Project title became to "demo" when disabling automatic analysis

Today I tried to integrate a new project into Sonar Cloud to analyze the code quality.

  1. In Sonar Dashboard, I added the project from Github(I have selected my Github repositories in Github app SonarCloud)

  2. In Administration/Anaylsis method, I disable the automatic analysis.

  3. In my project I added sonar maven plugin declaration.

  4. In the Github actions workflow, I used the sonar:sonar to send jacoco report to SonarCloud.
    https://github.com/hantsy/jakartaee10-starter-boilerplate/blob/master/.github/workflows/build.yml#L34

  5. After first build, go to my SonarCloud dashboard, the new project title become “demo”, not the original “jakartaee10-starter-boilerplate”, see: https://sonarcloud.io/project/overview?id=hantsy_jakartaee10-starter-boilerplate

Hey there.

It’s taking that from here:

You can pass in a different sonar.projectName either as an analysis parameter to your mvn command (mvn sonar:sonar -Dsonar.projectKey=jakartaee10-starter-boilerplate or in your pom.xml

<properties>
<sonar.projectName>jakartaee10-starter-boilerplate</sonar.projectName>
</properties>

or change the name of your artifact.

The project key is not working now???

But I have used it in several projects before , eg
https://github.com/hantsy/cargotracker/blob/master/.github/workflows/build.yml#L79

Tried to change as your codes, got the error like this,

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.10.0.2594:sonar (default-cli) on project demo: main component does not belong to specified organization -> [Help 1]

Which option did you use?