Solved

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

Posted on 2006-06-30
4
554 Views
Last Modified: 2012-06-21
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

0
Comment
Question by:BrianMc1958
  • 3
4 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 250 total points
ID: 17017832
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
 
LVL 35

Expert Comment

by:girionis
ID: 17017839
Have a look here: http://ant.apache.org/manual/CoreTasks/delete.html for more info
0
 

Author Comment

by:BrianMc1958
ID: 17018013
Works!
--BrianMc1958
0
 
LVL 35

Expert Comment

by:girionis
ID: 17019712
:-)
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now