Posted By

alces on 08/24/13


Tagged

clean maven antrun localRepository


Versions (?)

Clear local maven repository on clean goal via maven-antrun-plugin


 / Published in: XML
 

URL: mvn_antrun_clear_repo

Using this configuration in pom.xml 'clean' should be only one task in mvn command line (for ex. mvn clean compile now breaks a build on dependency problem, but mvn clean && mvn compile works fine).

  1. <build>
  2. <plugins>
  3. <plugin>
  4. <artifactId>maven-antrun-plugin</artifactId>
  5. <executions>
  6. <execution>
  7. <id>clear-repo</id>
  8. <phase>pre-clean</phase>
  9. <goals>
  10. <goal>run</goal>
  11. </goals>
  12. <configuration>
  13. <tasks>
  14. <delete dir="${settings.localRepository}"/>
  15. </tasks>
  16. </configuration>
  17. </execution>
  18. </executions>
  19. </plugin>
  20. </plugins>
  21. </build>

Report this snippet  

You need to login to post a comment.