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:56:21 GMT
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>

 I have my own Ant task to do the job I'm using everyday long. I called it
 "ExtendedProperty". That task works like AntContrib "var", I mean an existing
 property is replaced, and the value is interpreted with a stack. So it is not
 limited to two level of evaluation.  As it was developped for my job, it
 cannot be published yet.

 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