2013-08-02 41 views
3

Sonar 3.5.1,Jekins Sonar Plugin 2.1。 Plugin安裝在Jenkins中。 我已經在Sonar和默認設置中添加了後期製作操作。 我在建築時遇到了這個錯誤。在Jenkins(Maven Job)中設置SONAR Post構建動作

我不知道該怎麼做。我必須修改pom.xml嗎?

[ERROR] No plugin found for prefix 'sonar' in the current project and in the plugin 
groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories 
[local (/export/home/tpbuild/.m2/repository), central (http://repo.maven.apache.org 
/maven2)] -> [Help 1] 
org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for 
prefix 'sonar' in the current project and in the plugin groups [org.apache.maven.plugins, 
org.codehaus.mojo] available from the repositories [local (/export/home/tpbuild 
/.m2/repository), central (http://repo.maven.apache.org/maven2)] 

回答

1

添加以下行的settings.xml配置文件應該可以解決這個問題:

<build> 
    <pluginManagement> 
    <plugins> 
     <plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>sonar-maven-plugin</artifactId> 
     <version>2.1</version> 
     </plugin> 
    </plugins> 
    </pluginManagement> 
</build> 
0

需要配置meanse您需要提供sonarqube服務器的詳細信息管理jenkins->配置系統,數據庫細節和聲納跑步者細節在詹金斯

你確保聲納plugun必須安裝在詹金斯。

+0

我試圖編輯這個更清楚一點,但我不能確切地說出你的意思,所以我不能澄清它。 – pjmorse