You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by External Lists <ex...@ManagedObjects.com> on 2000/05/07 01:02:50 UTC

New Ant tas: ftp

Hi,

I wrote a new Ant task called ftp that will perform an FTP PUT of a file.
It uses the sun.net.ftp.FtpClient class in your JDK's classes.zip.

It would be great if someone chipped in and made this capable of sending an
entire tree, using includes, excludes and basedir.  It might become
acceptable to include in the official Ant at that point? <g>

Here is how it currently works:

        <ftp server="jakarta.apache.org"
             basedir="/pub/foozle/fliggle/fog"
             user="jsmith"
             password="hamsandwich"
             src="build.xml" />

Parameters:

    server - required: hostname of FTP server
    basedir  - optional: directory ON FTP SERVER to change to
    user - required: the FTP user name
    password - required: the FTP user password
    src - required: the local file to send
    dest - optional: the remote file name (defaults to src)
    mode - optional: transfer mode.  Choices are "ascii" and "binary";
default is binary

Don't forget to update your defaults.properties to include it as a built-in
task.

John