ant-user mailing list archives

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

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>

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

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,
Sharad.



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


Mime
View raw message