I have created an additional target directory called "dist" to which I am copying some build artifacts. Because it is not in the default target directories, I add an appropriate to the clean plugin configuration per Delete Additional Files instructions for the plugin, as follows:
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<fileset>
<followSymlinks>false</followSymlinks>
<directory>dist</directory>
<includes>
<include>*</include>
</includes>
</fileset>
</configuration>
</plugin>
But the "dist" directory and its contents remains after any "mvn clean". I've tried a number of variants, and checked the output of "mvn help:effective-pom" or the "mvn -X" debug output and, I find:
- The configuration is showing up in submodules' effective pom's.
- There is no error message
- There is no sign of "dist" directories or their contents in the debug output.
- Explicit references like
<directory>${basedir}/dist</directory>
make no difference. - Likewise, using more or less explicit
<include>
references like ".jar" or "*/*.txt" make no difference.
I'm using maven 3.0.3, clean plugin 2.5. I tried 2.4, just in case. No difference. Also, no permission problems.
I've scanned dozens of examples in Google, and all merely repeat the documentation's instructions. I am relatively new to Maven and still learning. Am I blind to something obvious? Thanks.