Posted By

alces on 09/05/13


Tagged

clean maven mvn maven-clean-plugin fileset


Versions (?)

Clear local maven repository via maven-clean-plugin


 / Published in: XML
 

URL: mvn_clean_plugin_clear_repo

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).

  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>

Report this snippet  

You need to login to post a comment.