Your goal would just be the goal from the antrun plugin that you want to
execute (in this case "run"). If you look at the list of lifecycle phases (
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html),
you could bind your execution to whichever phase makes most sense (say,
process-resources). So working with the example from the antrun usage (
http://maven.apache.org/plugins/maven-antrun-plugin/usage.html), you'd get
something like:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase> process-sources </phase>
<configuration>
<target>
<!--
your ant code
-->
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
so you're telling maven, run the "run" goal with this ant code during phase
process-sources.
On Mon, Jun 23, 2014 at 1:09 PM, kathyczv <[email protected]> wrote:
> I have a POM with packaging set to 'war'.
> I want to run 'antrun' plugin just before the code is compiled. What do I
> set the plugin's phase and goal to?
>
>
> My understanding is that the phase is one of the war's phases, for example:
> 'process-resources'
> Or a default one, for example: 'initialize'
>
> How about the goal, is that one of the antrun's goals?
>
> Your help is appreciated!
>