You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Russell Lear <ru...@earthlink.net> on 2004/04/17 05:13:48 UTC

newbie FTP task question

I'm new to ant, I love what I see and things have been mostly smooth,
but I'm having a bit of a problem:

I'm trying to use the (optional) ftp task with the following:

<project name="mytoy2" default="testftp" basedir="." >
    <target name="testftp">
        <ftp action="list"
             server="myserver"
             userid="anonymous"
             password="russelllear@earthlink.net"
             listing="pub">
             <fileset>
                <include name="**"/>
             </fileset>
         </ftp>
    </target>
</project>

Ant doesn't recognize the ftp task "Could not create task or type of type: ftp"

From reading the documentation I thought that all I had to do was to ensure
that there was an appropriate jar file in the ant lib directory.  

The "Library Dependencies" section says I need the commons-net.jar.  The 
"Installing Ant / Optional Tasks" section says that I can place that jar file
in the ant lib directory where it'll be picked up automatically.

I've tried that.  I also notice that there is already a file ant-commons-net.jar in
the lib directory that seems to have classes related to ant ftp, rexec and telnet
tasks.

Do I need to introduce the ftp task classes to ant somehow?

I'm using ant 1.6.1 on SuSE's 9.0 Linux with JDK 1.4.2.  I've tried downloading
both the src version (and building) and the binary version (only used one at a
time though!).  I am able to use the core tasks, so I seem to have a (semi)good
installation.

What am I doing wrong?! 

Thanks for the help,
Russell.




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: newbie FTP task question

Posted by Antoine Lévy-Lambert <an...@antbuild.com>.
Hi Russell,

you also need jakarta-oro, not only commons-net.
the ant-commons-net jar contains the ant ftp task.

Cheers,
Antoine

Russell Lear wrote:

>I'm new to ant, I love what I see and things have been mostly smooth,
>but I'm having a bit of a problem:
>
>I'm trying to use the (optional) ftp task with the following:
>
><project name="mytoy2" default="testftp" basedir="." >
>    <target name="testftp">
>        <ftp action="list"
>             server="myserver"
>             userid="anonymous"
>             password="russelllear@earthlink.net"
>             listing="pub">
>             <fileset>
>                <include name="**"/>
>             </fileset>
>         </ftp>
>    </target>
></project>
>
>Ant doesn't recognize the ftp task "Could not create task or type of type: ftp"
>
>>From reading the documentation I thought that all I had to do was to ensure
>that there was an appropriate jar file in the ant lib directory.  
>
>The "Library Dependencies" section says I need the commons-net.jar.  The 
>"Installing Ant / Optional Tasks" section says that I can place that jar file
>in the ant lib directory where it'll be picked up automatically.
>
>I've tried that.  I also notice that there is already a file ant-commons-net.jar in
>the lib directory that seems to have classes related to ant ftp, rexec and telnet
>tasks.
>
>Do I need to introduce the ftp task classes to ant somehow?
>
>I'm using ant 1.6.1 on SuSE's 9.0 Linux with JDK 1.4.2.  I've tried downloading
>both the src version (and building) and the binary version (only used one at a
>time though!).  I am able to use the core tasks, so I seem to have a (semi)good
>installation.
>
>What am I doing wrong?! 
>
>Thanks for the help,
>Russell.
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org