Hi,
Now, regarding the ant task for Maven, I have been trying "Antlib for
Maven
2.0" [] Unfortunately, this isn't
working for me. I am facing two issues with it.
The following is a short snippet taken from one of my pom.xml's that works quite well for me (I need to execute some special Ant tasks from within my PM):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<property name="srcdir" value="${basedir}//" />
<property name="websrcdir" value="${srcdir}/" />
<property name="destdir" value="${project.build.directory}/${project.artifactId}-${project.version}" />
<property name="webdestdir" value="${destdir}/WEB-INF/classes/META-INF" />
<copy file="${srcdir}/form/file.xml" tofile="${destdir}/form/copied-file.xml" overwrite="true" />
<delete dir="${destdir}/tmp" failonerror="false" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
Place your Maven commands inside the <tasks></taskssection (should be <install:install-fileor something similar; see the above URL), and it should work. You only should ensure that you bind the plugin to the correct phase.
This happens after I place "" into the
Maven's lib directory.
This file is for _Ant_, not for Maven (see the topic "Installing the Ant Tasks" in the URL you mentioned above)
HTH
Thorsten
To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
For additional commands, e-mail: users-help (AT) maven (DOT) apache.org