ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NR031 <nataraja...@cognizant.com>
Subject How to combine the values of 2 property files and putting into another property name
Date Tue, 24 Mar 2009 10:21:14 GMT

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


Mime
View raw message