我已使用MAVEN / maven / bin / mvn -X -e deploy从命令行将工件上传到Sonatype Nexus:deploy-file -Durl = http://maven-nexus.com/nexus/content/repositories/xyz -DrepositoryId = xyz -DgroupId = com.kumar -DartifactId = peshu -Dversion = 1.0.12 -Dpackaging = war -Dfile = RIGHT.war
现在我想从命令行中删除这个版本(1.0.12),以便我可以自动执行这个过程,我可以使用什么命令而不是Curl .
2 回答
简短的anwser:
curl --request DELETE --write "%{http_code} %{url_effective}\\n" --user login:password --output /dev/null --silent http://maven-nexus.com/nexus/content/repositories/xyz/com.kumar/peshu/1.0.12
这将删除你的nexus中的洞GAV .
注意:
--write "%{http_code} %{url_effective}\\n
选项将返回http代码和使用的有效网址;同上--output /dev/null --silent
隐藏输出上的一些详细信息,......我不太确定,但我认为您需要在Nexus上拥有管理员权限的用户登录 .
Nexus 2.5版有一个Remove Releases From Repository任务 .
这里将详细讨论删除已发布工件的问题:
https://support.sonatype.com/entries/20871791-Can-I-delete-releases-from-Nexus-after-they-have-been-published-