Okay, so the existing functionality doesn't seem to exists. Task is an abstract class (I just updated to make sure I have the most recent version). So, if it's implemented the way you describe, it will still be backward compatible :)
I'm an Xper (Extreme Programmer) and I love using Ant to run my JUnit test, so I run it often. Even little time savings add up for me. Erik > -----Original Message----- > From: Jon Tirs�n [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 08, 2000 7:39 PM > To: [EMAIL PROTECTED] > Subject: RE: Skipping tasks > > > 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 [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 08, 2000 7:14 PM > To: [EMAIL PROTECTED] > 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
