ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaganthi, Madhusudan R." <>
Subject RE: another request for help....
Date Tue, 08 Aug 2000 20:32:02 GMT

You dont have to create 20 different buildfiles BUT
You might have to call the same target 20 times with different values for
"first" and "second" properties. Try to isolate properties so that you can
call the same task with diff properties.

So your global build file would be like :

<property name="first" value="1">
<ant buildfile="unit.xml">

<property name="first" value="2">
<ant buildfile="unit.xml">


Hope you got what I'm getting at.

Let me know if you still have a question.


-----Original Message-----
From: David Weller []
Sent: Tuesday, August 08, 2000 4:31 PM
Subject: another request for help....

It's been a busy Ant-day for me :-)

I want to call multiple targets with different parameters (I guess you could
call it parameter passing).  The concept is that I want to set properties
<property name="first" value="foo"/>
<property name="second" value="bar"/>

<property name="EJB_JAR" value="hc_ejb_${first}_${second}.jar"/>
<property name="outdir" value="com/baz/${first}/${second}";
<property name="EJB_TEMP" value="${ext.TEMP}/${outdir}"/>
<property name="EJB_CLIENT_CLASSES" 

Where ${first} and ${second} vary depending on the target (yes, this is a
world" example).  Since properties behave more like "final" variables in
how do I accomplish this?  Am I trying to do the wrong thing?  I really
want to create 20 different buildfiles with the actual values of ${first}
${second} hardcoded into them :-(

So how do I do this?  Do I need to use something different from properties?

Do You Yahoo!?
Kick off your party with Yahoo! Invites.

View raw message