ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koegel, Michael" <>
Subject AW: howto: generating buildfile from template
Date Mon, 22 Jul 2002 11:16:54 GMT
Do you really need to create a new build file or would providing a
property-file together with the generic build-file be sufficient?


-----Urspr√ľngliche Nachricht-----
Von: []
Gesendet am: Montag, 22. Juli 2002 11:40
An: Ant Users List
Betreff: howto: generating buildfile from template

Hi all,

I would like to know what is the best way to generate
buildfiles using a template ...

In detail ...

I have a template buildfile for web-applications which
includes all the steps from exporting an app-version from
a cvs-repository to deploying it to my appserver.

Now I like to have a task in another buildfile which takes this
template an exchanges some values for my webapp,
for example

      <project name=3D"<>" default=3D"package" basedir=3D=

   should become ...

      <project name=3D"MyWebApp" default=3D"package" basedir=3D".">

      (the string "MyWebApp" comes from a property-file)

    subject=3D"${ant.mail.subject} ${}
${ant.project.version} ${}" (no change needed)

  should become ...

    subject=3D"${ant.mail.subject} ${}
${ant.project.version} ${}"

  (the string <app.context> comes from  new String("MyWeb=App").toLowerCase

I also don't want to loose the formatting of my buildfile and keep all =
in the resulting document.

I tried this using the style-task but had problems getting my comments
into the resulting document and further don't know how to convert a str=
toLowerCase() in xslt.

Should I use another task or write my own one using jdom?

Any ideas, hints, tips to achieve this are
very much appreciated.



MAN Nutzfahrzeuge AG
Anton Grimm
Abt. IDP (SoftwareProduktionsumgebungen)
80995 M√ľnchen

Tel.:      089/1580-1054
Fax:      089/1580-911054

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message