Java, mvn tool, how to using mvn uninstall package? Have some plugin, tool, shell script and command method?
32 Answers
If you want to uninstall/remove any artifact downloaded by maven just go to your ~/.m2/repository directory, where all installed artifacts are stored and delete that one which you want to get rid of.
All you have to do is remove the dependency from your pom.xml, maven should take care of the rest.
I really struggled with this because I had an upstream dependency that included the dependency I was trying to remove, so even mvn dependency:purge-local-repository didn't help - in that case, it might be worth trying to configure dependency exclusions (also in the pom.xml file).