Well, I finally got this to work and thought my findings might be helpful
for others that are trying to use the cool ftp feature in ant.

I am not exactly sure what was the turning point to get this to work, but I
think adding the ftp to the server value was the key.  Before, I had the ip
address.  You could do without the taskdef if running from the command line,
but this is required to use in Eclipse.

        <path id="classpath">
                <pathelement location="${ant_lib}/jakarta-ant-1.4.1-optional.jar"/>
                <pathelement location="${ant_lib}/netcomponents.jar"/>
      </path>
        <taskdef name="ftp"
                classname="org.apache.tools.ant.taskdefs.optional.net.FTP">
                <classpath refid="classpath"/>
        </taskdef>
        <target name="ftp_upload" depends="init">
                <ftp server="ftp.website.com"
                        remotedir="${ftp_dir}"
                        userid="${ftp_user}"
                        password="${ftp_pass}"
                        binary="yes"
                        depends="yes"
                        verbose="yes">
                        <fileset dir=".">
                                <include name="**/*.*"/>
                        </fileset>
                </ftp>
        </target>

Kent

-----Original Message-----
From: Kent Roylance [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 8:36 PM
To: Ant Users List
Subject: RE: Ant is FTPing all files, rather than just the latest
updates


Doesn't seem to make a difference, even if the time is the same on both
machines.

Kent

-----Original Message-----
From: Ylan Segal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 8:51 AM
To: Ant Users List
Subject: RE: Ant is FTPing all files, rather than just the latest
updates


Have you checked the time in the server and your machine? If the clocks are
mest up, your machine may think that all files are new.

Ylan Segal.

> -----Original Message-----
> From: Kent Roylance [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 8:27 AM
> To: Ant Users List
> Subject: Ant is FTPing all files, rather than just the latest updates
>
>
> I cannot figure out how to get Ant to only upload files that have changed.
> I have tried a number of combinations using depends and newer and none of
> them seem to work.  I am uploading from a win2k client to a win2k
> server.  I
> can run this script several times in one setting, and it uploads the same
> files over and over again.  I would think after the file is uploaded the
> first time, it wouldn't upload again until it has changed either on the
> server or the client.  I am using Ant 1.4.1.
>
>       <target name="ftp_upload">
>               <ftp server="652.893.239.18"
>                       remotedir="/java/info"
>                       userid="user"
>                       password="password"
>                       binary="no"
>                       depends="yes"
>                       newer="yes"
>                       verbose="yes">
>                       <fileset dir=".">
>                               <include name="**/*.htm"/>
>                       </fileset>
>               </ftp>
>       </target>
>
> Appreciate any help on this,
>
> Kent
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to