ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ma, Jian" <>
Subject RE: copying on files changed
Date Sat, 08 Dec 2001 02:37:22 GMT
my experience with copy is that if the destination file exists already, it
doesn't do anything even if you've made changes to the src file(It could be
I didn't set some attribute correctly).  I used <dependset> to solve this
problem.  You can define dependent relationship between src and target
files.  Whenever src files got changed, ant detects it and remove all the
target files to force copy to regenerate them.

Jian"Chuck" Ma
1620 Montgomery St. Suite 140
San Francisco, CA 94111

-----Original Message-----
From: Steve Loughran []
Sent: Friday, December 07, 2001 6:32 PM
To: Ant Users List
Subject: Re: copying on files changed

----- Original Message -----
From: "Christopher Berry" <>
To: "Ant-User (E-mail)" <>
Sent: Friday, December 07, 2001 3:23 PM
Subject: copying on files changed

> Greetings,
> We are building many projects independently. Each of these projects build
> within their own project structure (i.e. they have their own /src and
> directories). After compilation, the CLASS files are then copied from
> into a central deployment area named whatever/classes. This all works well
> enough. (Note: we do not compile directly into /classes, or use separate
> files, for several reasons)
> So here's my problem. I would like to copy only those CLASS files which
> just compiled from /build into /classes. I think this is possible using
> <uptodate> task with an appropriate <mapper>. But I haven't yet gotten it
> work properly. I'm hoping that one of the Ant gurus on this list might
> me some guidance.

By default <copy> only copies files if they are newer than the destination.
So it should be all you need.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message