When running mvn install
on a local multi module project it builds and install the projects artifacts into the local repo. mvn clean
seems to clean up my project specific target directories.
What command do I use with maven to get it to uninstall my projects modules from the local repo? for example my projects outputs foo-0.1.jar and bar-0.2.jar I want those removed from my local repo without having to go in there and delete them myself.
You can purge artifacts from your local repository, but why do you like to do this? Apart from that you can do that via maven-dependency-plugin:
This will purge all project- and dependency artifacts
This can be influenced by supplemental command line arguments (see the documentation) for further details.
Best is to implement a release strategy, i.e. as long as the artifacts under development appending the version with
SNAPSHOT
. Maven then automatically updates the artifacts in the local repository when you run install. Once you have completed the development you remove the SNAPSHOT and release the version (i.e. via deploy). If further development is required you could increase the version number and append it again with SNAPSHOT.