【问题标题】:Sonar server can not be reached at 0.0.0.0:9000无法在 0.0.0.0:9000 访问声纳服务器
【发布时间】:2013-07-30 22:24:30
【问题描述】:

我已经按照this guide 在 Ubuntu 12.04 上安装了声纳。我可以在终端启动声纳,但是当我尝试将它用作 maven 插件 mvn sonar:sonar 时出现错误:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project portalE: Sonar server can not be reached at 0.0.0.0:9000. Please check the parameter 'sonar.host.url'. -> [Help 1]

我可以使用浏览器轻松打开 0.0.0.0:9000 和 localhost:9000 。在 pom.xml 我只添加了:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>sonar-maven-plugin</artifactId>
    <version>2.1</version>
</plugin>

我在项目的根目录中有文件(sonar-project.properties):

# required metadata
sonar.projectKey=project
sonar.projectName=Project_name
sonar.projectVersion=2.0

# optional description
sonar.projectDescription=Project description 
# path to source directories (required)
sonar.sources=src/

# The value of the property must be the key of the language.
sonar.language=java

# Encoding of the source code
sonar.sourceEncoding=UTF-8

我以前从未使用过声纳,所以请告诉我这里是否还有更多配置要做。我阅读了文档,但看不到我在哪里犯了错误。任何帮助表示赞赏。

【问题讨论】:

    标签: maven sonarqube


    【解决方案1】:

    好吧,我犯了一个非常愚蠢的错误...在 maven settings.xml 文件中,我将 URL 设置为 0.0.0.0:9000,所以我忘记了 http:// 抱歉,这个问题其实很容易回答。

    【讨论】:

      猜你喜欢
      • 2015-11-12
      • 2016-01-04
      • 1970-01-01
      • 1970-01-01
      • 2018-10-14
      • 1970-01-01
      • 1970-01-01
      • 2015-01-15
      • 1970-01-01
      相关资源
      最近更新 更多