我通常只是等到我们的开发人员上网,但那将是另外12个小时,在这种情况下为时已晚,让我达到某个目标。
但是,我试图通过我们的Jenkins面板构建我们的网站项目,并且构建失败。我已经确定它不是我对它所做的最新改变的b / c,因为我还原并仍然有同样的问题。
而且我已经阅读了错误信息,但是不能理解编程已经足够了(除了我自己教过的,随着时间的推移,这并不是很多)来得出明确的答案和/或解决方案这个问题。所以我想我会在这里问,并可能及时得到一些答案/可能的解决方案。提前谢谢!
[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
答案 0 :(得分:9)
我今天遇到同样的问题。 com.google.http-client的最新版本为1.22.0,绝对属于[1.19.0,2.0]范围。
不确定导致分辨率错误的是什么,但这是一个hacky解决方法。
在您当地的maven repo中找到appengine-gcs-client-0.6.pom。
e.g。我的是$ 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>
答案 1 :(得分:0)
此处是google-http-client的维护程序。
我们已手动推送了缺少的1.24.1父版本。我已经在本地进行了测试,似乎可以解决该问题。请仔细检查,让我知道问题是否仍然存在。
https://repo1.maven.org/maven2/com/google/http-client/google-http-client-parent/1.24.1/