Hi,
I have a issue retrieving a value for a dynamically created property.
Below I'm trying generate property 'dngesb' dynamically and then
retrieve value for it from property file.
Ant file:
<project name="test" default="testdb" basedir=".">
<property file="test.properties" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement
location="${basedir}/lib/ant-contrib-1.0b3.jar" />
</classpath>
</taskdef>
<target name="testdb">
<var name="dbname" value="${environment}${country}esb"/>
<echo>parameter dbname = ${dbname}</echo>
<echo>value of dbname = ${${dbname}}</echo>
</target>
</project>
Property file:
environment=d
country=ng
dngesb=NALLESB
dnaesb=AALLESB
dafresb=FALLESB
Output:
testdb:
[echo] parameter dbname = dngesb
[echo] value of dbname = ${${dbname}}
Thapelo Kekana
TSC Technologies (Pty) Ltd
(o) +27(11) 431 1667
(c) +27(71) 397 0647
Email: [email protected]
http://www.tsctech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]