sgoertzen / sonar-break-maven-plugin

Fail your maven build if sonar detects issues with the code
MIT License
10 stars 15 forks source link

Failed to execute goal #14

Closed raderio closed 8 years ago

raderio commented 8 years ago

Failed to execute goal com.github.sgoertzen:sonar-break-maven-plugin:1.1.3:sonar-break (default-cli) on project some-project: Error while running sonar break: Unable to deserialize JSON response: [] -> [Help 1]

Caused by: com.sgoertzen.sonarbreak.SonarBreakException: Unable to deserialize JSON response: [] at com.sgoertzen.sonarbreak.QueryExecutor.parseResponse(QueryExecutor.java:111) at com.sgoertzen.sonarbreak.QueryExecutor.fetchSonarStatus(QueryExecutor.java:69) at com.sgoertzen.sonarbreak.QueryExecutor.fetchSonarStatusWithRetries(QueryExecutor.java:148) at com.sgoertzen.sonarbreak.QueryExecutor.execute(QueryExecutor.java:131) at com.sgoertzen.sonarbreak.SonarBreakMojo.execute(SonarBreakMojo.java:54)

sgoertzen commented 8 years ago

The plugin is not getting a valid response from your SonarQube server. What version of SonarQube are you running?

raderio commented 8 years ago

SonarQube 5.3 and 5.4

sgoertzen commented 8 years ago

You can try running maven in debug mode. (Add -X I believe).

If you paste the output from the plugin here I may be able to debug more.

Currently out of the country without my laptop so can't do any real debugging on my cell phone.

raderio commented 8 years ago

clean test sonar:sonar sonar-break:sonar-break -e -X -Dsonar.analysis.mode=issues -Dsonar.issuesReport.html.enable=true

Querying sonar for analysis on com.some-project, version: TRUNK-SNAPSHOT Parameter sonarLookBackSeconds set to value of 60 Parameter waitForProcessingSeconds set to value of 300 Built a sonar query url of: http://some-project:9000/api/resources/index?resource=com.some-project&metrics=quality_gate_details Got a valid response of 200 from http://some-project:9000/

Failed to execute goal com.github.sgoertzen:sonar-break-maven-plugin:1.1.3:sonar-break (default-cli) on project some-project: Error while running sonar break: Unable to deserialize JSON response: [] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.sgoertzen:sonar-break-maven-plugin:1.1.3:sonar-break (default-cli) on project some-project: Error while running sonar break

there are no more logs

raderio commented 8 years ago

@throws SonarBreakException Thrown if the response is not JSON or it does not contain quality gate data.

Why do you throw exception when it does not contain quality gate data?

sgoertzen commented 8 years ago

A couple thoughts:

  1. Are you able to get to the URL it listed in you web browser? ( http://some-project:9000/api/resources/index?resource=com.some-project&metrics=quality_gate_details )
  2. Maybe try running it without the sonar parameters? I wouldn't think that would make a difference but don't know for sure.

If neither of those help then the next step would be to create a simple project that reproduces the issue. However even if you do that I won't be able to look at it until I am back home next week.

You are also welcome to try and debug it yourself and submit a pull request if you can figure out what is going on.

Sorry for the trouble and good luck!

On Mon, Apr 4, 2016, 4:22 PM raderio notifications@github.com wrote:

clean test sonar:sonar sonar-break:sonar-break -e -X -Dsonar.analysis.mode=issues -Dsonar.issuesReport.html.enable=true

Querying sonar for analysis on com.some-project, version: TRUNK-SNAPSHOT Parameter sonarLookBackSeconds set to value of 60 Parameter waitForProcessingSeconds set to value of 300 Built a sonar query url of: http://some-project:9000/api/resources/index?resource=com.some-project&metrics=quality_gate_details Got a valid response of 200 from http://some-project:9000/

Failed to execute goal com.github.sgoertzen:sonar-break-maven-plugin:1.1.3:sonar-break (default-cli) on project some-project: Error while running sonar break: Unable to deserialize JSON response: [] -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.sgoertzen:sonar-break-maven-plugin:1.1.3:sonar-break (default-cli) on project some-project: Error while running sonar break

there are no more logs

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/sgoertzen/sonar-break-maven-plugin/issues/14#issuecomment-205208463

sgoertzen commented 8 years ago

@raderio Are you still having a problem? If not I am going to close out the issue.

sgoertzen commented 8 years ago

Closing this as unable to reproduce