ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Meade" <>
Subject Re: RE: Skipping tasks
Date Fri, 10 Nov 2000 02:50:17 GMT
Thanks, that does work.

In the case of jars it is not needed, but I had a build where it was broken.

Erik wrote on 11/9/00 6:55 am:

>Why not use the
><uptodate> task?  It sets a
>property if a particular file is
>more up to date (has a more
>recent timestamp) than a
>set of files.  So do
><target name="build"
>... compile and manifest
>targets ...
>  <uptodate
>    <srcfiles
>rectory}" />
>  </uptodate>
><target name="jar"
>  ... do your jarring ...
>Not tested, but this should
>Glenn McAllister
>Software Developer. IBM
>Toronto Lab, (416)
>448-3805 "An approximate
>answer to the right question
>is better than the right
>answer to the wrong
>question." - John W. Tukey
>Please respond to
>; Please respond to
>Subject:  RE: Skipping tasks
>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
>> -----Original Message-----
>> From: Jon Tirsén
>]  Sent: Wednesday,
>November 08, 2000 7:39 PM
>> 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
>> 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
>> 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
>> -----Original Message-----
>> From: Erik Meade
>org]  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
>> 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