aspose file tools*
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
Author

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.

Thanks,

Kev
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Kev,
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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant FTP overwriting