What about creating a "controller" build file that is responsible for
creating the templated build files and invoking them? That is the 'hack'
solution idea, I suppose.
I'd like to explore the ProjectHelper plugin capability more myself at some
point in the near future, and will try to document it officially when I get
around to working on my ideas. But for now, if you look in Ant's CVS you
will see the code used to select the ProjectHelper implementation - one of
its mechanisms is to use a system property to set the implementation class
name, but there are a few steps it follows when choosing, so I recommend
having a look at the source code to find the details.
Erik
----- Original Message -----
From: "Wannheden, Knut" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 22, 2002 10:01 AM
Subject: changing the main initialization procedure
> Hi,
>
> I have written a simple templatization mechanism for Ant buildfiles, which
> basically lets me create a buildfile for a project. What I'd like to do
now
> is to change the initialization procedure of Ant so that it first creates
a
> buildfile from the template if it is missing or out of date with respect
to
> the template. But I'm not quite sure what's the best place to make these
> changes. The options I see are:
>
> - writing a custom shell script which checks if the buildfile needs to be
> created (or updated) before handing over to ant
> - adapting org.apache.tools.ant.Main to do that piece of work first
> - or even at a lower level (ProjectHelper)
>
> I think the various aproaches have their pros and cons. But if I also
want
> the <ant> task to use the template mechanism I probably have to write my
own
> ProjectHelper aswell, right? Then my next question is: How do I plug in
my
> own ProjectHelper?
>
> Thanks in advance,
>
> --
> knut
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>