> From: Steve Cohen [mailto:[EMAIL PROTECTED] > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]