2016-07-23 3 views
7

私のDevがオンラインになるまで通常は待っていましたが、それはさらに12時間ほどかかるでしょう。特定の目標。JenkinsでMavenビルドエラーが発生しました(Semi time sensitive)

しかし私はJenkinsパネルを介してウェブサイトプロジェクトを構築しようとしていましたが、ビルドに失敗しました。私は、それが元に戻って同じ問題を抱えているので、私がそれにした最新の変更のb/cではないと判断しました。

私はエラーabitを読んだことがありますが、プログラミングがほぼ完了していないことを理解していません。この問題のだから私はここで尋ねるだろうと思って、時にはいくつかの答え/可能な解決策を得るだろう。早めにありがとう!

[ERROR] Failed to execute goal on project moduleCommon: Could not resolve 
dependencies for project com.mtgprice:moduleCommon:jar:1.0: Failed to collect dependencies 
at com.google.appengine.tools:appengine-gcs-client:jar:RELEASE 
-> >com.google.http-client:google-http-client:jar:[1.19.0,2.0): No versions >available for 
com.google.http-client:google-http-client:jar:[1.19.0,2.0) within >specified range -> [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/DependencyResolutionException 
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command 
[ERROR] mvn <goals> -rf :moduleCommon>Build step 'Invoke top-level Maven targets' marked build as failure 
Started calculate disk usage of build 
Finished Calculation of disk usage of build in 0 seconds 
Started calculate disk usage of workspace 
Finished Calculation of disk usage of workspace in 0 seconds 
Finished: FAILURE 

答えて

9

今日は同じ問題があります。 com.google.http-clientの最新バージョンは1.22.0で、[1.19.0,2.0]の範囲に当てはまります。

解決エラーの原因はわかりませんが、ここではうっかりした回避策があります。

ローカルのMavenレポでappengine-gcs-client-0.6.pomを見つけます。

Mineは$ HOME/.m2/repository/com/google/appengine/tools/appengine-gcs-client/0.6/appengine-gcs-client-0.6.pomの下にあります。

バージョンの範囲を最新バージョンに変更します。

<dependency> 
    <groupId>com.google.http-client</groupId> 
    <artifactId>google-http-client</artifactId> 
    <!-- <version>[1.19.0,2.0)</version> --> 
    <version>1.22.0</version> 
</dependency> 

実際の解決策を見つけたら、回答を更新します。

更新: 私は問題の原因は、http://central.maven.org/maven2/com/google/http-client/google-http-client/maven-metadata.xmlが古くなったコンテンツを持っていることだと思います。

<?xml version="1.0" encoding="UTF-8"?> 
<metadata> 
    <groupId>com.google.http-client</groupId> 
    <artifactId>google-http-client</artifactId> 
    <versioning> 
    <latest>1.5.3-beta</latest> 
    <release>1.5.3-beta</release> 
    <versions> 
     <version>1.5.0-beta</version> 
     <version>1.5.3-beta</version> 
    </versions> 
    <lastUpdated>20111021163718</lastUpdated> 
    </versioning> 
</metadata> 

pom.xmlを更新して、違反する過渡的な依存関係を除外し、明示的に追加することもできます。

<!-- mapreduce --> 
<dependency> 
    <groupId>com.google.appengine.tools</groupId> 
    <artifactId>appengine-mapreduce</artifactId> 
    <version>0.8.5</version> 
    <exclusions> 
     <exclusion> 
      <!-- TODO remove me after the issue is fixed https://github.com/google/google-http-java-client/issues/330 --> 
      <groupId>com.google.http-client</groupId> 
      <artifactId>google-http-client</artifactId> 
     </exclusion> 
    </exclusions> 
</dependency> 

<dependency> 
    <groupId>com.google.appengine.tools</groupId> 
    <artifactId>appengine-gcs-client</artifactId> 
    <version>0.6</version> 
    <exclusions> 
     <exclusion> 
      <!-- TODO remove me after the issue is fixed https://github.com/google/google-http-java-client/issues/330 --> 
      <groupId>com.google.http-client</groupId> 
      <artifactId>google-http-client</artifactId> 
     </exclusion> 
    </exclusions> 
</dependency> 

<!-- Add the transitive dependency explicity --> 
<dependency> 
    <groupId>com.google.http-client</groupId> 
    <artifactId>google-http-client</artifactId> 
    <version>1.22.0</version> 
</dependency> 
+0

これを今すぐ試してみましょう。それが役立つかどうかをすぐにお知らせします。ありがとう! これは、他の人の音が聞こえてからの問題であるようです。しかし、ここでも私の知識はこの分野では限られているので、私は根本的な前提をしてはいけません。 –

+0

そして、大丈夫、そのハッキーな回避策は間違いなく助けになったので、ありがとう! 私は今、一つの問題が残っています。それは、私のローカルmvnリポジトリ内でその変更をどこで/どのように行うのか知っています。しかし私はJenkinsのmvnリポジトリ内でそうする方法を知らない。私は十分な十分なアクセス権を持っている必要がありますが、そこにファイルを配置したり編集したりする場所が不明です。その上の任意のポインタは、偶然に? –

+0

古いメタデータが見つかった場合は、ここで行ったように更新が必要です:https://issues.sonatype.org/browse/MVNCENTRAL-1187 – khmarbaise

関連する問題