【发布时间】:2015-03-14 01:02:51
【问题描述】:
不是重复的!我已经查看了类似标题的 SO 资源,但是这个问题似乎与 Jenkins 和 ssh 有关,其他的都没有涵盖这个问题。具体来说,这不是 Maven 问题,而是 Jenkins 问题。
在解析我的 POM 时,Jenkins 无法通过 ssh 连接到 nexus(它正在寻找它正在处理的 POM 的父 POM)。在这个过程中(接近开始),POM 没有被 Maven 本身读取——它被 Jenkins(或其中一个插件)用来创建依赖树,以便可以在正确的环境中构建项目命令。我得到的错误是peer not authenticated。
这是输出的相关位:
Parsing POMs
Failed to transfer Could not transfer metadata org.us.thing:thingy:2.0/maven-metadata.xml
from/to nexus (https://nexus:2443/nexus/content/groups/public):
peer not authenticated
ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
java.lang.IllegalStateException: Failed to build parent project for org.us.thing:thingy:pom:2.0
at org.apache.maven.project.MavenProject.getParent(MavenProject.java:381)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1325)
我已经使用javax.net.ssl.trustStore 配置了一个信任库,当 maven 运行构建时,这可以通过 Jenkins 正常工作。我还认为 Jenkins 正在以某种方式关注它,因为不使用信任存储时出现的错误通常是不同的,但我不确定这是否真的如此。
我已使用我的关联 URL 和凭据将工件解析器配置为存储库管理器。我还使用我的凭据为 nexus 域设置了一个“Credentails”条目。
那么,如何进行呢?我的解决方案会很好,但我会满足于更多的面包屑。
【问题讨论】: