ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Tirsén <>
Subject RE: Skipping tasks
Date Thu, 09 Nov 2000 03:39:19 GMT
The requirements for implementing such functionality is that there is an
ability to ask a task "did you do something?". Ie. the Task interface has a
method "boolean isUpToDate()" (or something). To my understanding there is
no such thing on the Task-interface.

It would be possible to add something like that but that would break the
existing tasks. If there was a base-class for the tasks (instead of an
interface) one could add such a method that by default returns false (ie. is
not up-to-date), so that it is always run by default and if one wanted to
support such optimization one returns true at the correct times.

The question though is how much time would actually be saved? I think that
some time might actually be saved since it doesn't need to hit the disk as
often and that many tasks could be skipped in a long chain. (For my own
current project I really expect the time-savings could be potential.) But
this is just guessing...

-----Original Message-----
From: Erik Meade []
Sent: Wednesday, November 08, 2000 7:14 PM
Subject: Skipping tasks

I'm wondering about allowing tasks to be "skipped" if the tasks they are
dependent on do nothing.  Lets say I have three targets, A, B, and C.  C
is dependent on A and B.  A compiles my source files to a classes
directory, B copies over the manifest and/or the deployment descriptor C
jars them up. If A doesn't compile any files and B doesn't copy over the
files because they haven't changed, I would prefer that C not jar.

If memory serves me correctly having the jar task verify all the dates
doesn't get you much until you have a large number of files, but it seems
to me maybe there would be a way to "infer" that since A and B did
nothing, C should do nothing too?

Anyway to do this now?  Any reason someone shouldn't try to add this
functionality if it doesn't already exists?

Erik Meade

View raw message