Thats the baby, works a treat. Cheers, Mike S.
>>> [EMAIL PROTECTED] 16/03/2007 16:06:40 >>> Mike, I use antcontrib tasks to do this. The tasks <propertycopy>, <propertyregex> and <propertyselect> are very useful to do this. http://ant-contrib.sourceforge.net/ Put it in it own namespace. I generally do this: <project basedir="." default="init" name="SCM" xmlns:ac="sf.antcontrib"> ...... <taskdef resource="net/sf/antcontrib/antlib.xml" uri="sf.antcontrib"/> ...... <ac:propertycopy name="port.number" from="remote.jboss.jndi.port.${remote.jboss.server}" override="true" /> Hope this helps. GregD 859-386-8309 -----Original Message----- From: Mike Stewart [mailto:[EMAIL PROTECTED] Sent: Friday, March 16, 2007 11:56 AM To: [email protected] Subject: Concatenating a string to a property Hi, I am trying to get a value from a property that is defined in the build.properties file - remote.jboss.jndi.port.server1=17031 remote.jboss.server=server1 The remote.jboss.server varies depending on which client is being built, I tried the definition below but it is performing text substitution. <property name="port.number" value="remote.jboss.jndi.port.${remote.jboss.server}" /> <echo message="the port number is ${port.number} ${remote.jboss.jndi.port.server1}" /> When run via Ant the output is the port number is remote.jboss.jndi.port.b4usony 17031 Any ideas on how to get the value? Mike S. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
