views:

263

answers:

1

Is it possible to attach an ant execution to a specific plugin/goal ? ( I know I'm losing the declarative aspect of maven if I do that..)

+3  A: 

Check out Maven AntRun plugin, that's exactly what you're looking for

Here is an example from its homepage

<project>
  ...
  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <phase> <!-- a lifecycle phase --> </phase>
            <configuration>

              <!-- ANT TASKS HERE -->

            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>
victor hugo
Thank you. I'm aware of the plugin. But my question was: Can I attach an ant execution ( as seen in your code) to another plugins goal..
vpalle
I guessed that, I edited and put the example code for that reason hehe ;)
victor hugo