Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-8783

Improve display of error when uploading scanner report

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4
    • Component/s: Scanner
    • Labels:
      None

      Description

      We should try to parse error response as JSON and display the message more clearly:

      [INFO] Analysis report generated in 114ms, dir size=217 KB
      [INFO] Analysis reports compressed in 23ms, zip size=70 KB
      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO] 
      [INFO] SonarQube :: Plugins :: SCM :: SVN ................. FAILURE [  9.308 s]
      [INFO] SonarQube :: Plugins :: SCM :: SVN ................. SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 10.365 s
      [INFO] Finished at: 2017-02-13T09:18:33+01:00
      [INFO] Final Memory: 67M/433M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.536:sonar (default-cli) on project svn: Error 404 on http://localhost:9000/api/ce/submit?organization=MyOrg&projectKey=org.sonarsource.scm.svn:svn&projectName=SonarQube%20::%20Plugins%20::%20SCM%20::%20SVN&projectBranch=foo : {"errors":[{"msg":"Organization with key 'MyOrg' does not exist"}]} -> [Help 1]
      

      Log after the improvement:

      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 10.962 s
      [INFO] Finished at: 2017-03-01T13:38:13+01:00
      [INFO] Final Memory: 65M/987M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3-SNAPSHOT:sonar (default-cli) on project sonarlint-cli: Failed to upload report - 404: Organization with key 'qerew' does not exist -> [Help 1]
      [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
      
      

        Attachments

          Activity

            People

            • Assignee:
              duarte.meneses Duarte Meneses
              Reporter:
              julien.henry Julien Henry
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: