【发布时间】:2017-10-18 10:34:39
【问题描述】:
我是 sonarqube 的新手,正在尝试用它分析一个 maven 项目。我正在使用以下命令开始分析
mvn sonar:sonar -Dsonar.host.url=http://localhost:9000 -Dsonar.login=TOKEN_GENERATED
但我收到 404 错误
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building crystalviz 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) @ crystalviz ---
[INFO] User cache: /Users/gkumar6/.sonar/cache
[ERROR] SonarQube server [http://localhost:9000] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.184 s
[INFO] Finished at: 2017-10-18T16:00:59+05:30
[INFO] Final Memory: 25M/437M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project crystalviz: Unable to execute SonarQube: Fail to get bootstrap index from server: Status returned by url [http://localhost:9000/batch/index] is not valid: [404] -> [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
即使我可以在浏览器中访问http://localhost:9000,maven 也无法访问它。
请帮我解决这个问题。提前致谢。
【问题讨论】:
-
使用 sonarqube-5.6.7 后问题得到解决
-
当您在浏览器中转到localhost:9000 时,您是否看到 SonarQube 的仪表板?