Reputation: 4076
I want do delete a folder at clean phase.
I have used maven-clean-plugin
and successfully deleted all of the files under it.
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<filesets>
<fileset>
<directory>GENERATED_DIR</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
I want to delete "GENERATED_DIR" as well.
Upvotes: 5
Views: 4270
Reputation: 4076
This finally worked for me
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>**/GENERATED_DIR/**</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
Upvotes: 3
Reputation: 7950
The following works for me
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/GENERATED_DIR</directory>
</fileset>
</filesets>
</configuration>
</plugin>
Upvotes: 7