0
我已經安裝聲吶在Ubuntu 12.04之後this guide。我可以在終端啓動聲納,但是當我嘗試使用它作爲Maven插件mvn sonar:sonar
我有錯誤:9000使用的瀏覽器:聲納服務器無法達到0.0.0.0:9000
[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以及本地主機
。在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
我以前從未使用聲納,所以請告訴我是否有更多的配置在這裏做。我閱讀文檔,但無法看到我犯的錯誤。任何幫助讚賞。