How can I reuse an ant snippet in multiple projects? Lets say I have the following in my root pom.xml
:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>gen-index</id>
<phase>package</phase>
<configuration>
<target>
... some non-trivial ant stuff here ...
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
<execution>
</executions>
</plugin>
How can I have this ant snippet executed for selected sub-projects? I've tried adding the <plugin>...</plugin>
part above to <pluginManagement>...
, but I can't figure out how to specify for which sub-projects the ant snippet should be run.