hi,
I use the antrun plugin to delete and move some property files depending on the profile that is used:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete>
<fileset dir="${project.build.outputDirectory}/com/.../props">
<exclude name="pm-web-${profile.id}.xml" />
</fileset>
</delete>
<move file="${project.build.outputDirectory}/com/.../props/pm-web-${profile.id}.xml"
tofile="${project.build.outputDirectory}/com/.../props/pm-web.xml" />
</tasks>
</configuration>
</execution>
</executions>
When I check the target/classes folder I can see that the 'unwanted' property files have been correctly deleted and that the move task was also correctly executed. However, when I look at the built war-file I see that the deleted files are still in there (the moved file is ok int the war).
I don't understand how this might be possible; I assume the war plugin basically jars up the target folder? Since the files have correctly been deleted from the target folder I would expect them not to be in the war as well.
To complicate things (sorry) I've noticed that the delete sometimes works partialy, meaning: sometimes some folders (not all) have been 'deleted from the war'.
I've tried changing the goal of the task (no luck) but I assume that most of the goals occur before building the war anyhow.
thanks for any help,
Stijn