且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用REST API从Nexus中使用分类器删除工件?

更新时间:2022-04-18 22:33:19

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

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