0%

Maven PurgingLocalRepository

Purging local repository dependencies

The purpose of thedependency:purge-local-repositorygoal is to purge (delete and optionally re-resolve) artifacts from the local maven repository. This page describes some of the configuration options available to the plugin.

1
mvn dependency:purge-local-repository

Dependency includes/excludes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>purge-local-dependencies</id>
<phase>process-sources</phase>
<goals>
<goal>purge-local-repository</goal>
</goals>
<configuration>
<excludes>
<exclude>[groupId1]:[artifactId1]</exclude>
<exclude>[groupId2]:[artifactId2]</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
</project>