You can't do that! Double interpolation doesn't work. Fortunately, you can use a macro to accomplish it:
<macrodef name="ExpandPropertyValue"> <!-- evaluate nested properties, ie ${${x}} work around --> <attribute name="name"/> <attribute name="value"/> <sequential> <property name="@{name}" value="${@{value}}"/> </sequential> </macrodef> -----Original Message----- From: Vinodh Kumar [mailto:vinoh...@gmail.com] Sent: Thursday, December 15, 2011 12:23 PM To: user@ant.apache.org Subject: Property not loaded Hi, Can someone let me know why the /${${env}.test} value not printed as testest1/ *cmd*:ant -f build.xml -Denv=IT1 *build.xml* <project name="Application Deployment" default="task" basedir="."> <property file="build.properties"/> <target name="task"> <echo>${env}</echo> <echo>${${env}.test}</echo> </target> </project> *build.properties* IT1.test=testest1 *OUTPUT:* task: [echo] IT1 [echo] ${${env}.test} BUILD SUCCESSFUL Total time: 0 seconds -- View this message in context: http://ant.1045680.n5.nabble.com/Property-not-loaded-tp5078347p5078347.h tml Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org