【发布时间】:2012-01-12 13:14:32
【问题描述】:
我正在尝试在 Jenkins 中设置 Maven2 作业。我的 pom.xml 中有这样的行:
<distributionManagement>
<repository>
<id>releases</id>
<name>Releases</name>
<url>http://nexus.example.com:8081/nexus/content/repositories/releases</url>
</repository>
...
</distributionManagement>
我在尝试构建作业时收到此错误:
...
Downloading: http://repo1.maven.org/maven2/.../.../.../....jar
[INFO] Unable to find resource 'resource id goes here' in repository central (http://repo1.maven.org/maven2)
...
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
...Here goes the list of missing dependencies.
我确定所需的工件确实存在于 nexus.example.com 存储库中,因为我可以在我的工作站上执行 mvn compile 并且它们会被下载。
但出于某种原因,Jenkins 甚至没有尝试从本地 repo 下载工件,忽略了 pom.xml 中的规范。
任何想法我可以尝试什么?
【问题讨论】: