ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: criticism: property handling (here: no overwrite)
Date Wed, 13 Jun 2001 07:41:38 GMT
At 09:14 AM 6/13/01 +0200, Stefan Bodewig wrote:
>Conor MacNeill <> wrote:
>> It would be nice if the path didn't evaluate the fileset until it
>> needed to supply the path so that paths based on jars in a fileset
>> where the jars don't yet exist can be used (if you know what I mean)
>You can do that now to a certain extent - just don't define the path
>until the jars have been created.
>For more than that, one would probably even need a way to refresh a
>path after jars have been added or removed - I'm not sure I'd want to
>go that far.

The way I was thinking about doing it (based on the myrmidon prototype) is
via another interface Resolvable. ie

interface Resolvable
  Object resolve( Context context ) 
    throws ContextException;

So if an object implements Resolvable it is resolved just before it is
"used". So in this case it would be when it is handed to task via
attribute. Or if you were 

<fileset id="foo" .../>

a. <property name="foo-evaluated1" value="${foo}" />
b. <property name="foo-evaluated2" value="${foo}" />
<copy todir=...>
 <fileset refid="foo"/>

So at each different time (a, b and c) the fileset could be resolved to
different values. That was what I was playing with and seemed to cover most
of the cases. 


| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message