Clear local maven repository via maven-clean-plugin


/ Published in: XML
Save to your folder(s)

Yet another way to clean maven local artifacts cache before build - putting local repository as Ant-like in maven-clean-plugin configuration (default clean action - cleaning target directory - works by default).


Copy this code and paste it in your HTML
  1. <project>
  2.  
  3. <!--
  4.  
  5. At least GAV are needed here
  6.  
  7. -->
  8. <build>
  9. <plugins>
  10. <plugin>
  11. <artifactId>maven-clean-plugin</artifactId>
  12. <version>2.1</version>
  13. <configuration>
  14. <filesets>
  15. <fileset>
  16. <directory>${settings.localRepository}</directory>
  17. <includes>
  18. <include>**/*.jar</include>
  19. <include>**/*.pom</include>
  20. <include>**/*.sha1</include>
  21. </includes>
  22. </fileset>
  23. </filesets>
  24. </configuration>
  25. </plugin>
  26. </plugins>
  27. </build>
  28. </project>

URL: mvn_clean_plugin_clear_repo

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.