对SONAR来说是新手......我的任务是分析一个Maven项目。
我按照SONARQube网站http://docs.codehaus.org/display/SONAR/Analyzing+with+Maven
中提到的所有步骤进行操作一切!但是当我尝试运行他们的示例时。我收到这个错误..
[INFO] Building Simple Java Maven Project
[INFO] task-segment: [sonar:sonar] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [sonar:sonar {execution: default-cli}]
[INFO] Sonar host: http://localhost:9000
[INFO] Sonar version: 4.1
[INFO] Execute: org.codehaus.sonar:sonar-maven-plugin:4.1:sonar
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/codehaus/sonar/so
nar-maven-plugin/4.1/sonar-maven-plugin-4.1.pom
[INFO] Unable to find resource 'org.codehaus.sonar:sonar-maven-plugin:pom:4.1' i
n repository central (http://repo1.maven.org/maven2)
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/codehaus/sonar/so
nar-maven-plugin/4.1/sonar-maven-plugin-4.1.pom
[INFO] Unable to find resource 'org.codehaus.sonar:sonar-maven-plugin:pom:4.1' i
n repository central (http://repo1.maven.org/maven2/)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar
Embedded error: Unable to build project for plugin 'org.codehaus.sonar:sonar-mav
en-plugin': POM 'org.codehaus.sonar:sonar-maven-plugin' not found in repository:
Unable to download the artifact from any repository
org.codehaus.sonar:sonar-maven-plugin:pom:4.1
from the specified remote repositories:
ibiblio.org (http://mirrors.ibiblio.org/pub/mirrors/maven2)
for project org.codehaus.sonar:sonar-maven-plugin
我不确定有什么问题..已经搜索过了......仍然没有结果。
答案 0 :(得分:0)
看起来iBiblio Maven存储库与Maven Central没有完全同步 - 在which you can find the 4.1 version without any issue上。
您应该更新Maven配置以不使用此存储库 - 而是使用标准存储库。