I want to start recording the benefits I get out of personal and local (team-level) automation.
When I have a local version of a maven library installed, say 0.19.0-SNAPSHOT, but I want to go back to using the last released version, say 0.18.0, then I need to delete the library from my local maven repo. I’ve learned the hard way that it is not enough to delete the directory in the jar; I have to delete another file too. So a while back, I scripted that.
This tiny program deletes a version of the `rug` library, since that’s usually the one I’m messing with.
set -eset -x
cd ~/.m2/repositorycd com/atomist/rugls $1rm maven-metadata-local.xmlrm -r $version