Solved

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

Posted on 2006-06-30
4
557 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Maven Project: Hibernate Dependencies Conflict 10 53
sql import cannot be resolved jsp 3 76
ejb entity bean example 2 37
Java Inheritance super keyword use 8 38
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn how to implement Singleton Design Pattern in Java.

733 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