gpt4 book ai didi

java - jenkins 构建无法下载依赖项,即使相同的 pom 在本地工作正常

转载 作者:行者123 更新时间:2023-12-01 17:33:34 24 4
gpt4 key购买 nike

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) org.hibernate:hibernate-core:jar:4.0.0.FINAL

...

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
spring-milestone (http://maven.springframework.org/milestone),
Hibernate (http://repository.jboss.org/nexus/content/groups/public/)

但是相同的 pom 和存储库/依赖项在我的本地开发版本上运行良好。Jenkins 在 ubuntu 机器上,所有其他依赖项都工作正常。我的 java 主目录设置为 /usr/lib/jvm/java-7-openjdk-i386 并且我已更新到最新版本的 Jenkins,希望它可以解决问题。

我的 resolv.conf 看起来像这样(我使用 resolvconf 包编辑它)

GNU nano 2.2.6            File: /etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

nameserver 8.8.8.8

我正在使用 jboss 存储库下载新的 hibernate jar,它在 POM 中的定义如下:

<repository>
<id>Hibernate</id>
<name>JBoss Hibernate repository</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</repository>

我还收到来自 maven/jenkins 的警告:

[WARNING] 
************ WARNING ************

This Maven runtime contains a LifecycleExecutor component with an incomplete configuration.

LifecycleExecutor class: org.apache.maven.lifecycle.LifecycleExecutorInterceptor
Missing component requirement: org.apache.maven.ConfigurationInterpolator

NOTE: This seems to be a third-party Maven derivative you are using. If so, please
notify the developers for this derivative project of the problem. The Apache Maven team is not
responsible for maintaining the integrity of third-party component overrides.

最佳答案

看来您在版本编号的“FINAL”部分使用了错误的大小写。尝试一下

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.0.0.Final</version>
</dependency>

虽然我真的不知道为什么它已经在本地工作了。也许这是 Windows 不区分大小写的文件系统,并且您已经从其他项目缓存了 Artifact ......

关于java - jenkins 构建无法下载依赖项,即使相同的 pom 在本地工作正常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8573470/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com