wood burning stoves
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant FTP overwriting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant FTP overwriting" Watch "Ant FTP overwriting" New topic

Ant FTP overwriting

Kev D'Arcy
Ranch Hand

Joined: Jul 26, 2001
Posts: 75
Hi all,

I'm having a problem with the ant ftp task. When I execute it as part of
a build script I'd prefer that the task failed if the same file is
encountered on the server. Is this possible? I've tried using the "depends"
attribute, but this always allows an update.


Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33106

The depends attribute only checks if your file is newer. This is likely if it is generated by the Ant build.

The FTP task itself doesn't provide a way to check if the file is already on the server. You could use an FTP get to see if it exists though.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: Ant FTP overwriting
It's not a secret anymore!