Search code examples
mavencygwinrepositorynexus

How to delete old repository before uploading new repository on nexus


How to delete old repository before uploading new repository on remote repository of nexus repository manager OSS 2.12.0-01, i am using

mvn clean install

and mvn clean deploy ?


Solution

  • You are deploying artifacts not repositories.

    You should never delete your uploaded artifacts and in case it's not your server you just can't delete it. Published artifacts could already be consumed be third parties and thus mustn't be deleted.

    But you can release your artifact as a SNAPSHOT version. In that case you can upload a new version of your artifact any time without changing the version. All you have to do is append '-SNAPSHOT' to the artifact's version like

    < version>1.0-SNAPSHOT< /version>

    EDIT:

    If you really, really want to delete artifacts on your server this answer should help you.