ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Lochart <dloch...@capecomputing.com>
Subject Re: Using for loop
Date Wed, 20 Jun 2007 21:13:48 GMT
If you need to generate something dynamically using a template I would 
use Velocity.  It is easy to make a velocity task (I believe by now one 
might exist) and you can use it.  You can feed Velocity a context of 
parameters and spit out a new build file very easily.

just a thought

Peter Reilly wrote:
> Yes,
> with ant1.6's <macrodef> and <import>, and with
> ant-contib's <if>, <var> and <for>, there
> should be no need to generate a build file.
>
> Peter
>
>
> On 6/20/07, Anderson, Rob (Global Trade) <Rob.Anderson@nike.com> wrote:
>> Generating a build2.xml file from another build file seems like a weird
>> thing to do. This is probably not the advice you are looking for, but I
>> suggest finding a different way to accomplish your goals. I cannot think
>> of a schenario that would require this, and I think you may be able to
>> accomplish your goals a lot easier.
>>
>> -Rob A
>>
>> > -----Original Message-----
>> > From: arijit [mailto:ghosh.arijit@wipro.com]
>> > Sent: Wednesday, June 20, 2007 7:19 AM
>> > To: user@ant.apache.org
>> > Subject: Using for loop
>> >
>> >
>> > I am trying to dynamically generate build2.xml by executing
>> > build1.xml. I have a build2_template.xml file and a property
>> > file. build2.xml is generated by reading the
>> > build2_template.xml and providing inputs to it through the
>> > property file.
>> >
>> > a series of similar code needs to be written in build2.xml
>> > file which is a repititive work. So I was thinking of using
>> > some for - loop to write codes like
>> >
>> > <property name="testN" value="TEST-N"/>
>> >
>> > in build2_template.xml
>> >
>> > where N could be from 1 to some value which is defined in the
>> > property file.
>> > the property file is loaded in build1.xml
>> >
>> > Any suggestion ?
>> >
>> >
>> > --
>> > View this message in context:
>> > http://www.nabble.com/Using-for-loop-tf3952686.html#a11214404
>> > Sent from the Ant - Users mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> > For additional commands, e-mail: user-help@ant.apache.org
>> >
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message