Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant FTP overwriting

 
Kev D'Arcy
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic