MAVEN PLUGIN(S) SERIES - Housekeeping of dependencies
PROBLEM
After a continuos use of maven for project lifecycle management , usually, the local dependencies' repository growth, risks to go out of control.SOLUTION
There are some plugins that help us to do housekeeping on local dependencies' repository.
The goal remove-project-artifact of builder-helper plugin, remove project's artifacts from local repository and it's useful to keep only one copy of large local snapshot.
The goal purge-local-repository of maven-dependency plugin, remove the project dependencies from the local repository.
I suggest you to take a look at both of them in order to understand their features, that offer us a wide range of possibilities.
such script has been realized only for unix/osx systems, but i guess will be simple translate it for windows.
This plugin contains various small independent goals to assist with the Maven build lifecycle.
- The dependency plugin provides the capability to manipulate artifacts. It can copy and/or unpack artifacts from local or remote repositories to a specified location.
The goal remove-project-artifact of builder-helper plugin, remove project's artifacts from local repository and it's useful to keep only one copy of large local snapshot.
The goal purge-local-repository of maven-dependency plugin, remove the project dependencies from the local repository.
I suggest you to take a look at both of them in order to understand their features, that offer us a wide range of possibilities.
Utility
To give you an idea of capabilities, below you find an interactive shell script that i've developed to perform the local dependencies housekeeping in easy way. Feel free to use it and let me know your feedbacks.such script has been realized only for unix/osx systems, but i guess will be simple translate it for windows.
mvnhousekeeping.sh
Comments
Post a Comment