ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <qazw...@gmail.com>
Subject Re: How to combine the values of 2 property files and putting into another property name
Date Tue, 24 Mar 2009 14:41:30 GMT
On Tue, Mar 24, 2009 at 6:21 AM, NR031 <nataraja.cp@cognizant.com> wrote:
>    <property name="project-URL" value="${${name1}-URL}">

That doesn't work. See:
http://ant.apache.org/faq.html#propertyvalue-as-name-for-property


On Tue, Mar 24, 2009 at 6:21 AM, NR031 <nataraja.cp@cognizant.com> wrote:
>
> Hi,
>
>  I have created 2 property files:
>
> test1.properties :
> Project1-URL=http://localhost:9080/dummyURL1
> Project2-URL=http://localhost:9080/dummyURL2
>
> test2.properties :
> name1=Project1
> name2=Project2
>
> and the ant target is :
>
> <target name="nestfile">
>    <property file="test1.properties"/>
>    <property file="test2.properties"/>
>    <property name="project-URL" value="${${name1}-URL}">
>    <echo>For Below tag I should get the
> http://localhost:9080/dummyURL1</echo>
>    <echo>${project-URL}</echo>
> </target>
>
>
>       when I run the above target I should get the
> http://localhost:9080/dummyURL1 in the command line, but currently I am
> getting the error. What is the sysntax for doing this?
>
> Please help me out.
>
> Thanks in advance,
> --
> View this message in context: http://www.nabble.com/How-to-combine-the-values-of-2-property-files-and-putting-into-another-property-name-tp22677473p22677473.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message