Hi,

> Now, regarding the ant task for Maven, I have been trying "Antlib for
> Maven
> 2.0" [http://maven.apache.org/ant-tasks.html].. 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 POM):

<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}/WEB-INF/src/META-INF/properties" />
          <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>...</tasks> section (should be 
<install:install-file...> or 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 "maven-artifact-ant-2.0.4-dep.jar" 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to