ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <ja...@squaretrade.com>
Subject Re: Evaluation of Patterns
Date Tue, 12 Dec 2000 16:39:58 GMT
If you can make the case for either approach,
why not offer both:

PatternSetImmediate
PatternSetDeferred

Jason

----- Original Message ----- 
From: "Peter Donald" <donaldp@apache.org>
To: <ant-dev@jakarta.apache.org>
Sent: Monday, December 11, 2000 11:09 PM
Subject: Evaluation of Patterns 


> Hi,
> 
> I have just been kicking around some ideas with respect to evaluation of
> Patterns. When do we want it to occur ? Should it occur when the
> Pattern/PatternSet is bound to a name or should it be when a patternset is
> applied to get a value (as in FileSet).
> 
> ie given the following sequence 
> 
> <property name="basepackage" value="com/biz/foo" />
> 
> <patternset id="mypattern" >
>   <include name="${basepackage}/Meep.java" />
> </patternset>
> 
> <property name="basepackage" value="com/biz/bar" />
> 
> <fileset dir="${client.src}" >
>   <patternset refid="mypattern" />
> </fileset>
> 
> What would you expect to be included. Would it be
> "${client.src}/com/biz/foo/Meep.java" or
> "${client.src}/com/biz/bar/Meep.java" ?
> 
> I used to think it was the first one but I think I have changed my mind. A
> few people have wanted this on ant-user but I never thought it would be
> useful. However I noticed that it is a common pattern to layour similar
> directory structures within projects based on the same framework.
> 
> For example IIRC Turbine used to have this requirement (and still does?).
> It used to layout a "module" as
> 
> <basepackage>.screens
> <basepackage>.navigations
> <basepackage>.actions
> <basepackage>.pages
> 
> and it's architecture mandated that.
> 
> Now if we want to reuse patternsets then I believe that the best way to do
> that would be to evaluate the patterns when they are applied to form a
> fileset. Thus the same patternset could be used for multiple turbine
> modules by changing value of basepackage and using the paternset in
> multiple filesets.
> 
> Comments ?
> 
> 
> Cheers,
> 
> Pete
> 
> *-----------------------------------------------------*
> | "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               |
> *-----------------------------------------------------*
> 


Mime
View raw message