Sonarqube maven plugin can't call bitbucket API

Since 26th of June the bitbucket API has changed; the method https://api.bitbucket.org/1.0/repositories/satiamogmbh/prime/pullrequests/4145/comments returns ‘response status of 410 Gone’.

Apparently the method call is crucial for the latest version of sonarqube maven plugin so our build fails:

10:06:52 [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project prime: POST https://api.bitbucket.org/1.0/repositories/satiamogmbh/prime/pullrequests/4145/comments returned a response status of 410 Gone -> [Help 1]
10:06:52 [ERROR]
10:06:52 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
10:06:52 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
10:06:52 [ERROR]
10:06:52 [ERROR] For more information about the errors and possible solutions, please read the following articles:
10:06:52 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Our call to run mvn sonar plugin on Jenkins:

clean
verify sonar:sonar
-B
-Dsonar.verbose=false
-Dsonar.bitbucket.repoSlug=prime
-Dsonar.bitbucket.accountName=satiamogmbh
-Dsonar.bitbucket.pullRequestId={pullRequestId} -Dsonar.bitbucket.oauthClientKey=************************ -Dsonar.bitbucket.oauthClientSecret=************************* -Dsonar.bitbucket.branchName={sourceBranch}
-Dsonar.bitbucket.minSeverity=INFO
-Dsonar.bitbucket.approvalFeatureEnabled=true
-Dsonar.bitbucket.maxSeverityApprovalLevel=MINOR
-Dsonar.host.url=http://docker5215-sonarqube.jelastic.elogate.com
-Dsonar.login=sonarqube
-Dsonar.password=*********************
-Dsonar.analysis.mode=issues

Hi Franck,

Which version of SonarQube are you using ?

Thanks.

Mickaël

Hi Mickaël!

Our SonarQube server’s version is: Version 7.1 (build 11001)

Regards,

Frank

Hi Frank,

Unfortunately this version is not supported anymore, and calls to the version 1.0 of Bitbucket APIs have ended since 7.4.

We can only recommend you to upgrade to a newer version.

Mickaël

1 Like

Hi,

Thanks, that did the trick.

Frank