ANT NEWBIE: How to overwrite on copy regardless of timestamp?

Dear Experts,

I'm an Ant dummy...

I have a working Ant that builds my project, and then additionally copies the classes to a remote box.  However, the TIME on the remote box keeps getting ahead of my time.  And it appears that the copy fails whenever that happens.  I can only assume that Ant is comparing the timestamps of the matching files, and not overwriting what it thinks are "later" files.

How can I tell it to overwrite regardless?

This is the Ant snippet;

    <copy todir="\\MyRemoteBox\MyProduct\bin">
     <fileset dir=".\classes"/>

Thanks!
BrianMc1958

BrianMc1958Asked:
Who is Participating?
 
girionisConnect With a Mentor Commented:
Hi BrianMc1958

You could delete the classes in the remote box befor you attempt to copy them, just use the <delete> task with the <fileset> element.

Cheers
0
 
girionisCommented:
Have a look here: http://ant.apache.org/manual/CoreTasks/delete.html for more info
0
 
BrianMc1958Author Commented:
Works!
--BrianMc1958
0
 
girionisCommented:
:-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.