I use the antrun plugin to delete and move some property files depending on the profile 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 see that the “unnecessary” property files were deleted correctly and that the move task also completed correctly. However, when I look at the built-in war file, I see that the deleted files are still there (the moved file is ok in the war).
I do not understand how this is possible; I assume the war plugin basically splits the target folder? Since the files were correctly deleted from the target folder, I would expect that they, too, would not enter the war.
(), , , : ( ) " ".
( ), , , .
,