How to remove artifacts using the classifier from Nexus using the REST API?

I know how to remove all GAV with this command:

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

It works like a charm.

Now I just need to remove the artifact using the classifier, I could not find or read the solution for this.

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

+6
source share
1 answer

To delete a specific artifact, use the following command:

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

Then you need to ask nexus to rebuild the metadata for gav (otherwise the * .md5 and * .sha1 files will remain in your repository)

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

All Articles