You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Nicola Ken Barozzi <ni...@apache.org> on 2002/05/23 08:51:31 UTC

Re: changing the main initialization procedure

From: "Wannheden, Knut" <kn...@paranor.ch>

> >
> > 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.
> >
>
> That way you probably would have to use system properties to tell the
> controller what buildfile to create and finally what target to invoke on
it.
> This would make it kind of hard to use the command line interface.  Of
> course I could provide my own CLI.  But also if I use the <ant> task I
would
> have to go through the controller and pass properties for buildfile and
> target.
>
> My goal is it to make it as easy as possible for the user to use the build
> mechanisms.  Of course many users would probably object that something as
> intransparent as I'm trying to do is easy...

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.

Thanks.

--
Nicola Ken Barozzi                   nicolaken@apache.org
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: changing the main initialization procedure

Posted by Peter Donald <pe...@apache.org>.
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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: changing the main initialization procedure

Posted by Peter Donald <pe...@apache.org>.
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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>