After a mvn deploy
(to a local Nexus) on a project with more than 50 modules I realized that the deployed artifacts had all wrong file names (suffix zip instead of war etc).
Is there something like mvn undeploy
to remove these from Nexus again?
Nexus is a repository manager that stores “artifacts”, which allows you to proxy collect and manage your dependencies, making it easy to distribute your software.
The deploy plugin is primarily used during the deploy phase, to add your artifact(s) to a remote repository for sharing with other developers and projects. This is usually done in an integration or release environment.
You can delete it by using Curl command :
http://host:port/nexus/service/local/repositories/repo-id/content/group-id/artifact-id/version
The delete request can be sent with these parameters, I like to suppress the output except HTTP status code, so that it’s easier to check the result of a series of such commands run from shell script.
curl –request DELETE –write “%{http_code} %{url_effective}\\n” –user admin:admin123 –output /dev/null –silent url
For example you can execute this script from a Freestyle jenkins job.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With