2016-09-13 8 views
-3

私はジェンキンスビルドを持っていますが、どのようにソナープラグインを呼び出すべきですか?しかし、私はエラーを取得するたびに:ソナー:ジェンキンのメイヴェーンビルで働いていないソナー。

私は依存関係を使用して、私のpom.xmlで
Downloaded: http://xxxx:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar (165 KB at 20577.1 KB/sec) 
[INFO] SonarQube version: 5.6.1 
Downloading: http://talas:8081/nexus/content/groups/public/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.pom 

Downloading: https://repo.maven.apache.org/maven2/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.pom 

[WARNING] The POM for org.codehaus.sonar:sonar-maven3-plugin:jar:5.6.1 is missing, no dependency information available 
Downloading: http://xxxx:8081/nexus/content/groups/public/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.jar 

Downloading: https://repo.maven.apache.org/maven2/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.jar 

[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 07:53 min 
[INFO] Finished at: 2016-09-13T12:42:59+02:00 
[INFO] Final Memory: 58M/1705M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project Core: Can not execute SonarQube analysis: Plugin org.codehaus.sonar:sonar-maven3-plugin:5.6.1 or one of its dependencies could not be resolved: Could not find artifact org.codehaus.sonar:sonar-maven3-plugin:jar:5.6.1 in server0001 (http://xxx:8081/nexus/content/groups/public/) -> [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 
Build step 'Invoke top-level Maven targets' marked build as failure 
Finished: FAILURE 

:Mavenの依存関係として含まれているこれ以外のプラグインを使用する理由

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

私は、理解していません。私はジェンキンスバージョン2.21を使用し

clean 
compile 
sonar:sonar 
-Dsonar.jdbc.url=jdbc:oracle:thin:@oracle11db:1521/orcl 
-Dsonar.host.url=http://192.168.0.100:9000 

ジェンキンス仕事は、次のターゲットを呼び出します。 SonarQubeスキャナ2.6.1は

Iはまた、直接

org.codehaus.mojo:sonar-maven-plugin:2.3:sonar 

をコールしようとしたグローバルコンフィギュレーションで設定されています。それはjava8が必要で、私のプロジェクトはJava7でビルドされました

+0

あなたは[効果的なポンポン](http://maven.apache.org/plugins/maven-help-plugin/effective-pom-mojoを確認しました。 html)と潜在的な[アクティブなプロファイル](http://maven.apache.org/plugins/maven-help-plugin/active-profiles-mojo.html)? –

+0

@ A_Di-Matteo:そうです。他のソナープラグインはありません –

+0

実際には存在しない 'sonar-maven3-plugin'バージョン' 5.6.1'を探しています(https://mvnrepository.com/artifact/org.codehaus.sonar/sonar- maven3-plugin)、sonarqubeサーバのバージョン '5.6.1'は存在していますが、Javaの8+しかサポートしていません(https://jira.sonarsource.com/browse/SONAR-7587)。面白い。 –

答えて

1

org.codehaus.mojoからプラグインを使ってみましたか?

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

出典:

http://docs.sonarqube.org/display/HOME/Frequently+Asked+Questions

+0

いいえ、私はそれを試していません。しかし、あなたが見ることができるように、それはorg.codehaus.mojo:sonar-maven-pluginと呼ばれています:2.2:ソナー –

+0

私は今試しました。しかし問題は、このバージョンのプラグインはJava 8が必要ですが、私は自分のプロジェクトを構築するためにjava7を使用しています –

関連する問題