To install the M2 Repository Cleanup Plugin artifact in version 1.0 add the following dependency to your pom.xml file for Maven Project.
The dependency needs to be added in the dependencies section which is located in the main project tag of the pom.xml file. The sample pom.xml file that uses M2 Repository Cleanup Plugin dependency could look as follows:
Below you can find code snippets for other project build tools like Gradle, SBT, Ivy, Grape, Leiningen, and Buildr.