Error executing maven sonar plugin with 8.9 community edition

Hello,
I’m trying to analyze a Maven project with SonarQube Community Edition. When I execute the maven command it ends with error indicating that “sonar.branch” is no longer supported but I’m not using this parameter (I only want to analyze master branch).
Is there any way to disable this parameter on maven plugin or to ignore it in SonarQube?

  • versions used: SonarQube Community Edition Version 8.9.2 (build 46101) and Maven plugin “sonar-maven-plugin:3.9.0.2155:sonar”
  • error observed
$ mvn sonar:sonar -Dsonar.projectKey=myProjectKey -Dsonar.host.url=https://sonarqube  -Dsonar.login=myLogin
[...]
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project test-project: The 'sonar.branch' parameter is no longer supported. You should stop using it. Branch analysis is available in Developer Edition and above. See https://redirect.sonarsource.com/editions/developer.html for more information. -> [Help 1]
  • steps to reproduce: latest LTS version of sonarqube with any version of sonar maven plugin.

Thank you.

Hi,

Welcome to the community!

It’s likely this parameter is introduced in a pom. Can you check?

 
Ann

Hello!
I checked it, pom file has only the groupId, artifactId and version.
I even tried deleting it from pom file and executing the mvn command alone.

Regards!

Hi,

I’m not sure what to tell you. Somewhere in your configuration (pom, params inserted by Jenkins, …?) that’s going to be present.

 
:woman_shrugging:
Ann

Yes, you were right.
The error somehow is related with the plugins “org.sonatype.nexus.plugins.nexus-plugins”, “org.sonatype.nexus.nexus-plugin-api”, “org.sonatype.nexus.nexus-capability” or “org.sonatype.goodies.goodies-testsupport”.
After removing them Sonar works properly.
I’m sorry for the inconvenience. Thank you very much for your help.

1 Like

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