Skip to content

Commit

Permalink
Delete working copy of repository created by release plugin (#289)
Browse files Browse the repository at this point in the history
* Delete working copy of repository created by release plugin

Use the maven-antrun-plugin to delete the target/checkout
directory, which is the default working copy directory
created by the Maven Release Plugin.

Closes #288
  • Loading branch information
sleberknight authored Feb 4, 2024
1 parent 36d7ff7 commit b75ecee
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -430,21 +430,28 @@
These duplicate classes will be seen by IDEs and cause problems.
The following ensures we delete the delomboked sources once we
no longer need them after generating the javadoc.
Also remove the working copy of the repository created by
the Maven Release Plugin.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
<executions>
<execution>
<id>delete-delombok-generated-sources</id>
<id>delete-unwanted-directories</id>
<phase>verify</phase> <!-- ensure this executes after javadoc -->
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- Delete the delomboked sources directory -->
<delete dir="${project.build.directory}/generated-sources/delombok" />

<!-- Delete the checkout directory created during the release process -->
<delete dir="${project.build.directory}/checkout"/>
</target>
</configuration>
</execution>
Expand Down

0 comments on commit b75ecee

Please sign in to comment.