如何使用REST API从Nexus中使用分类器删除工件? [英] How to delete artifacts with classifier from Nexus using REST API?

查看:223
本文介绍了如何使用REST API从Nexus中使用分类器删除工件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何使用此命令删除整个GAV:

I know how to delete a whole GAV using this command :

curl --request DELETE --user "login:password" http://myNexus/service/local/repositories/myRepository/content/myGroupId/myArtifactId/myVersion

它就像一种魅力.

现在,我只需要删除带有分类器的工件,就找不到或读取解决方案.

Now I need to just delete an artifact with a classifier, I could not find or read a solution for this.

我想知道是否可以使用Nexus REST API通过分类器删除工件?

I wonder if there is a way to delete an artifact with a classifier using the Nexus REST API ?

推荐答案

要删除特定的工件,请使用以下命令:

To delete an specific artifact, use this command:

curl --request DELETE --user "login:password" http://myNexus/service/local/repositories/myRepository/content/myGroupId/myArtifactId/myVersion/myArtifactId-myVersion.jar

然后您需要要求nexus重建gav的元数据(否则* .md5和* .sha1文件将保留在您的存储库中)

You need then to ask nexus to rebuild metadata for the gav (otherwise the *.md5 and *.sha1 files will stay on you repository)

curl -v --request DELETE  --user "login:password"  --silent http://nexusHost/service/local/metadata/repositories/myRepository/content

这篇关于如何使用REST API从Nexus中使用分类器删除工件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆