I'm migrating from ant to maven. However I have a custom build functionality for process web resources that I don't want to adapt yet to maven (the cost is very high) so I'm using ant run plugin.
I want to process some of the resource files calling the ant task. This needs to happen after the "copying webapp resources" step and before the "building war" steps within the phase package.
When I run my ant task, with the phase being "package"
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<ant antfile="${basedir}/build-resources.xml">
<property name="runtime-classpath" refid="maven.runtime.classpath"/>
</ant>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
I can accomplish mychanges to the files under the target/myapp-webapp
folder. However, since
myapp-webapp.war
is built before the ant task is run, these changes are not
getting to be a part of that war file.
Is there a way to accomplish this?