ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wolfgang haefelinger <whaefelin...@gmail.com>
Subject Re: Ant properties
Date Thu, 16 Jun 2011 07:39:28 GMT
Also ab damit in unsere Sammlung der "Klassiker" und wie man diese mit
Flaka angeht .. !

On Wed, Jun 15, 2011 at 4:03 PM, thapelo.kekana
<thapelo.kekana@tsctech.com> wrote:
> ---------- Forwarded Message -----------
>
>
> 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: thapelo.kekana@tsctech.com
> http://www.tsctech.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
Wolfgang Häfelinger
häfelinger IT - Applied Information Technology
http://www.haefelinger.it

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


Mime
View raw message