我正在嘗試將第三方供應商的jar添加到我們內部的nexus存儲庫。mvn deploy:deploy-file - 無法部署工件:找不到工件
我試圖這樣做使用這個命令:
mvn deploy:deploy-file
-DgroupId=acme
-DartifactId=acme
-Dversion=1.0
-Dpackaging=jar
-Dfile=C:\tmp\acme-1.0.jar
-DrepositoryId=Nexus
-Durl=http://myserver:8888/nexus/content/repositories/thirdparty/
在我的settings.xml以下條目:
<servers>
<server>
<id>Nexus</id>
<username>myusername</username>
<password>mypassword</password>
</server>
</servers>
但我得到這個錯誤:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy-file (default-cli) on project standalone-pom: Failed to deploy artifacts:
Could not find artifact acme:acme:jar:1.0 in Nexus (http://myserver:8888/nexus/c
ontent/repositories/thirdparty) -> [Help 1]
有什麼建議嗎?
一些相關的信息... 我可以安裝到我的本地庫就好了,使用這個命令:
mvn install:install-file
-DgroupId=acme
-DartifactId=acme
-Dversion=1.0
-Dpackaging=jar
-Dfile=C:\tmp\acme-1.0.jar
我也試過「神器上傳」通過Nexus的網絡界面,使用GAV參數:
Group: acme
Artifact: acme
Version: 1.0
Packaging: jar
並選擇&添加acme-1.0.jar。 這樣就完成了罰款,但該項目因這個jar結果 「MVN安裝」:
Could not find artifact acme:acme:jar:1.0 in Nexus (http://myserver:8888/nexus/content/groups/public)
我的POM包含:
<repositories>
<repository>
<id>Nexus</id>
<url>http://myserver:8888/nexus/content/groups/public</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
任何幫助非常讚賞...
PS我知道這個問題與this one非常相似,但問題似乎是使用詹金斯網址,而不是聯網網址。
只是爲了澄清..第三方回購默認情況下是一個版本庫,所以不需要改變它,除非有人將它改爲快照。請始終記住,Nexus Maven存儲庫既可以是快照,也可以是發行版,並使用組將它們混合在一起。 – 2013-04-29 19:37:16