Skip to content

Commit

Permalink
Introduce a -Dclean-cache flag
Browse files Browse the repository at this point in the history
When the build is executed with this flag, it removes the `.cache` which contains storage from the import and sort plugins per version (which may grow over time)
  • Loading branch information
gastaldi committed Sep 26, 2023
1 parent dcb875a commit 5adc2c2
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions independent-projects/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,40 @@
</pluginManagement>
</build>
<profiles>
<profile>
<id>clean-cache</id>
<activation>
<property>
<name>clean-cache</name>
<value>!false</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-cache-dirs</id>
<phase>pre-clean</phase>
<inherited>true</inherited>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>.cache</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
Expand Down

0 comments on commit 5adc2c2

Please sign in to comment.