Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin

Hi Team,

we are seeing below issue while analysing the PR.

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project messaging: PUT https://api.bitbucket.org/2.0/repositories/mediaiq/messaging/pullrequests/169/comments/127155637 returned a response status of 404 Not Found

If we delete this PR , for next PR it will be successful.
For every time , we dont want to delete this PR and try.

Is there any solution for this?

sonarqube version 7.6
we have this in pom file.

org.codehaus.mojo
sonar-maven-plugin
3.4.0.905

Hi,

It looks like you’ve pinned an old version of the scanner in your pom. I suggest you remove that; let Maven do its thing and apply the latest version. Older versions of the scanner call a URL that is indeed 404 now.

 
HTH,
Ann

@ganncamp But we are using sonar-scanner maven plugin version is 3.4.0.905 even in old pom file of PR and new PR also.
You meant say , we have to use the latest version in pom? which is 3.7 ?

Hi,

I mean to say that you shouldn’t pin any version in your pom. Just remove that whole block and the right thing should happen when you analyze.

 
Ann

Hi Ann,

Even after removing plugin version its the same issue. Can you please help on this, because of this stuck on many tasks.

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project amap-repo: PUT https://api.bitbucket.org/2.0/repositories/mediaiq/amap-common-lib/pullrequests/175/comments/130003966 returned a response status of 404 Not Found -> [Help 1] 14:22:15 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project amap-repo: PUT https://api.bitbucket.org/2.0/repositories/mediaiq/amap-common-lib/pullrequests/175/comments/130003966 returned a response status of 404 Not Found 14:22:15 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) 14:22:15 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

Ann,

Any update on this.?

Hi,

There’s not a lot of context to go on here, but getting a 404 during analysis means that somewhere a URL is misconfigured.

 
Ann

Its not an issue with URL, if we try to delete the PR and create a new PR ,next run it will be successful.

hey gann,

https://api.bitbucket.org/2.0/repositories/mediaiq/scheduling-service/pullrequests/6/comments/140702334 , this url is miss configured.

Not able to find where to update this and even we checked with bitbucket team.