/ Published in: XML
By default "mvn clean" cleans only target, for clear local repository run:
mvn clean -Dskip.repo.clean=false
mvn clean -Dskip.repo.clean=false
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<project> <!-- At least GAV are required here --> <properties> <skip.repo.clean>true</skip.repo.clean> </properties> <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>clear-repo</id> <phase>pre-clean</phase> <goals> <goal>run</goal> </goals> <configuration> <skip>${skip.repo.clean}</skip> <target> <echo>Purging ${settings.localRepository}...</echo> <delete> <fileset dir="${settings.localRepository}"> <include name="**/*.jar"/> <include name="**/*.pom"/> <include name="**/*.sha1"/> </fileset> </delete> </target> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
URL: mvn_antrun_preclean_clear_repo