Sonar-maven-plugin:3.0.2 not working with Sonarqube version 7.9.1

I have upgraded my Sonarqube instance (Developer Edition) from v7.3 to v7.9.1. I have upgraded jdk also from version jdk1.8.0_102 to JDK-11.0.4 as it is a prerequisite for Sonarqube v7.9.1. Sonar maven plugin used is - org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar

After upgrading to Sonarqube v7.9.1, Jenkins build jobs are failing with below error -

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project pepper: Unable to execute SonarQube: Fail to download libraries from server: 1 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Now, If i upgrade sonar-maven-plugin to 3.6.1.1688, Build jobs are working fine.

Could anyone please help me to understand why it is not working with sonar-maven-plugin:3.2 ? Also, please advice some solution to resolve it without changing the sonar-maven-plugin version.

Hi,

You’ve already found the solution to your problem. You can’t upgrade just one part of an ecosystem without keeping pace on the other parts. I’m guessing you don’t want to have to upgrade the SonarScanner for Maven because you’ve manually pinned the old version in a lot of poms. This is not recommended practice for reasons you’ve just discovered. My advice would be to make an editing sweep of all your poms and remove the version-pinning code altogether so that the next time there’s a scanner upgrade it can happen automatically.

 
Ann

A post was split to a new topic: [BUILD BREAKER] project fails quality gate

Hi G Ann Campbell,
Thanks for your reply. Could you please share the documentation/release notes link where it is mentioned that sonar-maven-plugin needs to upgraded to specific version.

Hi,

Take a look at the Upgrade Notes for 7.8

https://docs.sonarqube.org/latest/setup/upgrade-notes/#header-3

 
Ann

Thankyou.