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

**URL:** <https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446>\
**Category:** SonarQube Server / Community Build\
**Created:** [December 5, 2019, 3:27pm UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446 "2019-12-05T15:27:36Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nandeeshb](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nandeeshb/32/6643_2.png) [@nandeeshb](https://community.sonarsource.com/u/nandeeshb)\
**Post date:** [December 5, 2019, 3:27pm UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446/1 "2019-12-05T15:27:36Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [December 6, 2019, 7:21pm UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446/2 "2019-12-06T19:21:27Z")

</div>

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.

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![nandeeshb](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nandeeshb/32/6643_2.png) [@nandeeshb](https://community.sonarsource.com/u/nandeeshb)\
**Post date:** [December 9, 2019, 6:14am UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446/3 "2019-12-09T06:14:07Z")

</div>

@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 ?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [December 9, 2019, 7:45pm UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446/4 "2019-12-09T19:45:30Z")

</div>

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.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![nandeeshb](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nandeeshb/32/6643_2.png) [@nandeeshb](https://community.sonarsource.com/u/nandeeshb)\
**Post date:** [December 27, 2019, 9:26am UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446/5 "2019-12-27T09:26:47Z")

</div>

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](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](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)

---

<div class="post-metadata">

**Author:** ![nandeeshb](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nandeeshb/32/6643_2.png) [@nandeeshb](https://community.sonarsource.com/u/nandeeshb)\
**Post date:** [December 31, 2019, 5:18am UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446/6 "2019-12-31T05:18:05Z")

</div>

Ann,

Any update on this.?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [January 6, 2020, 6:51pm UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446/7 "2020-01-06T18:51:20Z")

</div>

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.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![nandeeshb](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nandeeshb/32/6643_2.png) [@nandeeshb](https://community.sonarsource.com/u/nandeeshb)\
**Post date:** [January 7, 2020, 2:59pm UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446/8 "2020-01-07T14:59:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nandeeshb](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/nandeeshb/32/6643_2.png) [@nandeeshb](https://community.sonarsource.com/u/nandeeshb)\
**Post date:** [March 23, 2020, 8:15am UTC](https://community.sonarsource.com/t/failed-to-execute-goal-org-sonarsource-scanner-maven-sonar-maven-plugin/17446/9 "2020-03-23T08:15:27Z")

</div>

hey gann,

[https://api.bitbucket.org/2.0/repositories/mediaiq/scheduling-service/pullrequests/6/comments/140702334](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.
