Hi,
I'm having problems compiling my
maven 2.0.6 proj using ant ftp as an anttask. Maven giving me the following error when I try to compile my project.
Embedded error: Could not create task or type of type: ftp.
Ant could not find the task or a class this task relies upon. I've read quite a few postings related to this problem but I still haven't managed to get this working.
I'm currently running ant 1.6.5 and have copied the following jars to the ant/lib folder: commons-net-1.4.1.jar, jakarta-oro-2.0.8.jar. I'm not having any problems using the ant ftp command building from ANT but in maven it just doesn't work.
Find attached the pom file I'm using
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:artifact="antlib

rg.apache.maven.artifact.ant"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion>
<groupId>mytester</groupId>
<artifactId>MyMavenWeb</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>MyMavenWeb Webapp</name>
<url>
http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant</artifactId>
<version>1.6.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>1.4.1</version>
<!--scope>
test</scope-->
</dependency>
<dependency>
<groupId>
junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<tasks>
<echo message="test ftp functionality"/>
<ftp server="ftp.testserver.com"
remotedir="/myfolder"
depends="yes"
userid="tester"
password="1234">
<fileset dir="${basedir}"/>
</ftp>
</tasks>
</configuration>
<!-- Run the ant target -->
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>