0
我想在Jenkins設置一個Maven2作業。我在我的pom.xml中有這樣幾行:如何指定Jenkins作業的內部公司Maven回購使用?
<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.
我知道肯定所需的構件做關係存在。 example.com存儲庫,因爲我可以在我的工作站上執行mvn compile
,並且它們將被下載成功。
但由於某些原因,Jenkins甚至不會嘗試從本地回購下載工件,而忽略pom.xml中的規範。
任何想法我可以嘗試什麼?
我已經想通了,我可以在jenkins的settings.xml中指定的東西。那就是訣竅。但我認爲你的想法也會有幫助。謝謝! –
vadipp