You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Weller <dg...@yahoo.com> on 2000/08/08 22:31:19 UTC
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 like
this:
<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"
value="${ext.CLIENT_CLASSES}/${EJB_DIRECTORY}"/>
Where ${first} and ${second} vary depending on the target (yes, this is a "real
world" example). Since properties behave more like "final" variables in Java,
how do I accomplish this? Am I trying to do the wrong thing? I really don't
want to create 20 different buildfiles with the actual values of ${first} and
${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.
http://invites.yahoo.com/