ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J. Xue" <>
Subject Re: how to only do stuff if javac compiled something?
Date Sat, 15 Nov 2003 19:50:20 GMT
Quoting Caoilte O'Connor <>:

> thanks I'll play with that over the weekend.
> but is this really something no one else has ever felt the 
> need for? I'm starting to feel like I didn't think my build 
> process through properly.

I am with you, Caoilte. 8-)
In one of my build scripts, I have a "build" target depending on "compile" 
and "inc-build".  "inc-build" reads from a file, increases 
a build.number property in it, and writes it back.  Obviously, I'd like to 
have inc-build run only when there was at least one file compiled 
during "compile".

So far I haven't figured out a satisfactory way of doing this.  The closest I 
could get is using <uptodate> as Matt Benson pointed out in his message.  The 
problems is <uptodate> does not have exactly the same dependency check as 
<javac> does.  When 1.6 beta came out, I felt the <date> Selector can be used

for that (create a timestamp just before you start compile, and afterwards try 
to select the class files modified after the timestamp), but then I couldn't 
figure out a way to test if a fileset is empty.


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

View raw message