ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Martin <yves.mar...@elca.ch>
Subject Re: Escaping ant property values
Date Thu, 09 Dec 2004 11:59:31 GMT
Yves Martin <yves.martin@elca.ch> writes:

> Jacob Kjome <hoju@visi.com> writes:
>
>> Quoting Matt Benson <gudnabrsam@yahoo.com>:
>>
>>> http://ant.apache.org/faq.html#propertyvalue-as-name-for-property
>>>
>>
>> This is not mentioned in the FAQ, but this can also be done in a properties file
>> as follows...
>>
>> my.auto-deploy=$${${my.server}.auto-deploy}
>>
>> Maybe one of the committers can add it to the FAQ?
>
>  So your solution:
>
> <script language="javascript">
>     propname = project.getProperty("my.server");
>     project.setNewProperty("my.auto-deploy", propname + ".auto-deploy");
> </script>

 Sorry, I wrote it too fast...

<script language="javascript">
    myservervalue = project.getProperty("my.server");
    myautodeployvalue = project.getProperty(myservervalue + ".auto-deploy");
    project.setNewProperty("my.auto-deploy",myautodeployvalue);
</script>

 Regards,
-- 
Yves Martin


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


Mime
View raw message