0

In order to achieve static code analysis, I followed - https://dzone.com/articles/source-code-analysis-testing-technique-using-sonar and when I hit - mvn sonar:sonar, it resulted into error -

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-
cli) on project testing: Error 500 on http://localhost:9000/api/ce/submit?
`projectKey=org.test:testing&projectName=testing -> [Help 1]

I googled this but nothing helped to resolved. I also tried answers of Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: 3.2:sonar but no luck.

Above error says 500 on http://localhost:9000/api/ce/submit?projectKey=org.test:testing&projectName=testing and when I open this url in browser it gives -

{"errors":[{"msg":"HTTP method POST is required"}]}

Could you please help to understand how this can be resolved?

Alpha
  • 13,320
  • 27
  • 96
  • 163
  • is sonar qube running on http://localhost:9000 ? – Vinay Veluri Dec 05 '19 at 09:59
  • Yes Vinay, it is running on http://localhost:9000/ – Alpha Dec 05 '19 at 10:08
  • Can you post the complete error trace ? and also pom.xml – Vinay Veluri Dec 05 '19 at 10:22
  • There are no more logs in console. It starts with what I've mentioned in test but after that it has following but I think that won't help to find out cause - `[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` – Alpha Dec 05 '19 at 10:27
  • Any clues in the SonarQube logs? – Jeroen Heier Dec 06 '19 at 05:03

0 Answers0