ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Castermans <...@beta9.be>
Subject Re: using Ant's FTP capabilities
Date Thu, 26 Oct 2000 20:11:23 GMT
Kevin Cummings wrote:

> I'm trying to use Ant's FTP'ing capabilities but seem to have run in to a
> little snag. Here's the little script I've made:
>
> <project name="FTPTest" default="ftp" basedir=".">
>
>    <target name="setVars">
>         <property name="build" value="build"/>
>         <property name="src" value="./jln/pODB"/>
>         <property name="dist" value="dist"/>
>    </target>
>
>    <target name="prepare" depends="setVars">
>         <tstamp/>
>         <mkdir dir="build"/>
>    </target>
>
>    <target name="compile" depends="prepare">
>         <javac srcdir="${src}" destdir="${build}" />
>    </target>
>
>    <target name="dist" depends="compile">
>      <mkdir dir="${dist}/lib"/>
>
>      <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
>      <jar jarfile="${dist}/lib/FTPTest-${DSTAMP}.jar" basedir="${build}"/>
>    </target>
>
>    <target name="ftp" depends="dist">
>         <ftp server="server"
>              remotedir="ftptest"
>              userid="username"
>              password="password"
>              binary="no">
>         <fileset dir="${dist}/lib"/>
>         </ftp>
>    </target>
>
> </project>
>
> This works fine without the ftp section but I get the following error when
> I add the ftp command:
>
> BUILD CONFIG ERROR: Could not create task of type: ftp because I can't find
> it in the list of task class definitions
> org.apache.tools.ant.BuildException: Could not create task of type: ftp
> because I can't find it in the list of task class definitions
>          at org.apache.tools.ant.Project.createTask(Project.java:359)
>          at
> org.apache.tools.ant.ProjectHelper.configureTasks(ProjectHelper.java:187)
>          at
> org.apache.tools.ant.ProjectHelper.configureTargets(ProjectHelper.java:164)
>          at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:127)
>          at org.apache.tools.ant.Main.runBuild(Main.java:223)
>          at org.apache.tools.ant.Main.main(Main.java:191)
>
> I have the 1.2 build of Ant.
>
> Can anybody help??
>
> Thanks for your time,
> -- Kevin Cummings

Get NetComponents from http://www.savarese.org/oro/downloads/ and put the
included jar in ants classpath

Also don't forget the optional.jar in ants classpath


Mime
View raw message