首页 文章

Nexus artifact删除命令

提问于
浏览
6

我已使用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 回答

  • 4

    简短的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上拥有管理员权限的用户登录 .

  • 8

相关问题