ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sharad" <>
Subject How to get the value of a property using another property?
Date Thu, 19 Aug 2004 10:52:28 GMT

I want to get the value of a property using another property.

for eg In the following ant script :

<project name="test" default="all">
	<property name="sharad" value="valueofpropertysharad"/>
	<target name="test2">
		<echo message="Value of property ${propname} = ${${propname}}"/>

	<target name="all">
		<antcall target="test2">
			<param name="propname" value="sharad"/>

i am passing the parameter "propname" to the target test2. I want the target
test2 to print the value of the property whose name is supplied to the
target using param tag. If i use ${${propname}} as shown in 4th line above,
its not working.

Can anyone please help me to achieve this?

Thanks and Regards,

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

View raw message