首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Jenkins中的Maven构建错误(半时间敏感)

Jenkins中的Maven构建错误(半时间敏感)
EN

Stack Overflow用户
提问于 2016-07-23 01:55:19
回答 2查看 873关注 0票数 7

我通常只会等到我们的Dev在线,但这将是大约12个小时,这将是太晚了,在这种情况下,对我来说,以满足特定的目标。

但是,我试图通过我们的Jenkins面板构建我们的网站项目,但是构建失败了。我已经确定它不是我对它所做的最新修改的b/c,因为我恢复了并且仍然有相同的问题。

我已经阅读了错误的abit,但是我对编程还不太了解(另外,随着时间的推移,我自学的内容也不多),无法找到明确的答案和/或解决这个问题的方法。所以我想在这里问一问,也许能及时得到一些答案/可能的解决方案。提前谢谢你!

代码语言:javascript
复制
[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
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-07-23 03:12:11

我今天也有同样的问题。最新版本的com.google.http-client是1.22.0,这肯定属于[1.19.0.0,2.0]范围。

不确定是什么导致了分辨率错误,但这里有一个麻烦的工作。

在本地maven repo中找到appengine-gcs-client-0.6.pom。

我的是在$HOME/.m2/repository/com/google/appengine/tools/appengine-gcs-client/0.6/appengine-gcs-client-0.6.pom.之下

将版本范围更改为最新版本。

代码语言:javascript
复制
<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>

一旦我找到了真正的解决方案,我就会更新答案。

Update:我认为问题的原因是http://central.maven.org/maven2/com/google/http-client/google-http-client/maven-metadata.xml的内容过时了。

代码语言:javascript
复制
<?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以排除违规的传递依赖关系,并显式地添加它。

代码语言:javascript
复制
<!-- 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>
票数 9
EN

Stack Overflow用户

发布于 2018-08-01 17:54:03

这里是谷歌的维护者-http-客户端。

我们已经手动推出了缺少的1.24.1父级版本。我在本地进行了测试,似乎解决了这个问题。请再检查一遍,如果问题仍然存在,请告诉我。

https://repo1.maven.org/maven2/com/google/http-client/google-http-client-parent/1.24.1/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38537416

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档