You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Hawkins, Keith" <KH...@us.nomura.com> on 2003/12/16 20:31:16 UTC

Nested property value de-referencing. Possible???

Say you have a property called env set to a value of "qa"  and you have a
property called qa.install.dir  set to /local/install/qa.

Is it possible to do something  like the following

	<property name="installDir"   value="${$env}.install.dir}" />
	<echo "Install dir = ${installDir} "/>

and have the echo spit out Install dir = /local/install/qa

If nested dereferencing is not possible, what is the standard ant approach
to handling these situations?

Thanks,
Keith

Nomura Securities International
Phone: 212-667-9785
Fax:     646-587-9785

-----  This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please delete it and all copies from your
system, destroy any hard copies and notify the sender. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part
of this message if you are not the intended recipient. Nomura Holding
America Inc., Nomura Securities International, Inc, and their respective
subsidiaries each reserve the right to monitor all e-mail communications
through its networks. Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the sender
is authorized to state the views of such entity. Unless otherwise stated,
any pricing information in this message is indicative only, is subject to
change and does not constitute an offer to deal at any price quoted. Any
reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.

Re: Nested property value de-referencing. Possible???

Posted by Peter Reilly <pe...@corvil.com>.
You need to use propertycopy from ant-contrib.

Peter
Hawkins, Keith wrote:

>Say you have a property called env set to a value of "qa"  and you have a
>property called qa.install.dir  set to /local/install/qa.
>
>Is it possible to do something  like the following
>
>	<property name="installDir"   value="${$env}.install.dir}" />
>	<echo "Install dir = ${installDir} "/>
>
>and have the echo spit out Install dir = /local/install/qa
>
>If nested dereferencing is not possible, what is the standard ant approach
>to handling these situations?
>
>Thanks,
>Keith
>
>Nomura Securities International
>Phone: 212-667-9785
>Fax:     646-587-9785
>
>-----  This message is for the named person's use only. It may contain
>confidential, proprietary or legally privileged information. No
>confidentiality or privilege is waived or lost by any mistransmission. If
>you receive this message in error, please delete it and all copies from your
>system, destroy any hard copies and notify the sender. You must not,
>directly or indirectly, use, disclose, distribute, print, or copy any part
>of this message if you are not the intended recipient. Nomura Holding
>America Inc., Nomura Securities International, Inc, and their respective
>subsidiaries each reserve the right to monitor all e-mail communications
>through its networks. Any views expressed in this message are those of the
>individual sender, except where the message states otherwise and the sender
>is authorized to state the views of such entity. Unless otherwise stated,
>any pricing information in this message is indicative only, is subject to
>change and does not constitute an offer to deal at any price quoted. Any
>reference to the terms of executed transactions should be treated as
>preliminary only and subject to our formal written confirmation.
>
>  
>


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