ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <SCo...@sportvision.com>
Subject RE: macrodef - do attributes as properties or substitutions
Date Wed, 19 Nov 2003 15:06:17 GMT
True, that was from the 1.4/1.5 days.

-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com] 
Sent: Wednesday, November 19, 2003 8:52 AM
To: 'Ant Developers List'
Subject: RE: macrodef - do attributes as properties or substitutions


> From: Steve Cohen [mailto:SCohen@sportvision.com]
> I have used a similar idea with a build file full of "template" 
> targets that use a fileset reference.  The reference must be defined 
> globally or the build will break, but only some of the users of the 
> file of "templates" actually need the reference.  So, since references

> can be overridden, the solution is, similar to Stefan's,
> 
> <fileset id="globaltlds" dir=".">
>     <include name="no.real.file"/>
> </fileset>
> 
> Later, a user of this buildfile can redefine the globaltlds reference,

> if it needs to, to something real.

Yeah, this sounds a lot like the Null Object idiom you can read about in
Martin Fowler's Refactoring book. OTOH, now that there is the
<isreference> condition, a cleaner approach might be to conditionaly
execute the target only of the reference is defined at all, rather than
defining a null/dummy one. Probably not applicable all the time, but
still. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message