I first thought about this approach too, but then I'd have a "dummy" buildfile for every project which has to be maintained (i.e. adding new targets). Alternatively I could of course have a dispatcher target which reads the actual target to run from a property. But I'm trying to find out if I could do the merging inside a ProjectHelper, which seems to be an even cleaner approach to me.
-- knut > -----Original Message----- > From: Peter Donald [mailto:[EMAIL PROTECTED]] > Sent: Freitag, 24. Mai 2002 05:09 > To: Ant Developers List > Cc: Ant Users List > Subject: Re: changing the main initialization procedure > > > Hi, > > On Thu, 23 May 2002 16:51, Nicola Ken Barozzi wrote: > > Peter Donald (have to use full name because this list is > soooo full ;) , > > any hint on how to include a basic templating mechanism > with current Ant? I > > recall you favor templating, and I'm sure you can help us > (I'm interested > > too) and give us some advice. > > The way I would suggest to do things with the current ant is > the following. > > Create a master build file that contains delegating targets. > Each of these > targets just generate the real build file(s) from the > template and then call > the actual target. ie an example delegating target may be > > <target name="clean" depends="gen-buildfiles"> > <ant antfile="mynewbuild.xml" target="clean"/> > </target> > > An example of this in action (mainly done by Adam) is > available in the > jakarta-ant-myrmidon CVS. > > Have a look at > > jakarta-ant-myrmidon/build.xml (Master build file) > jakarta-ant-myrmidon/tools/xsl/build.xsl (Template file) > jakarta-ant-myrmidon/*/project.xml (Input data files) > > -- > Cheers, > > Peter Donald > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>