You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by joe7pak <bi...@pobox.com> on 2007/08/14 23:47:58 UTC
variable interpolation in depends attr of target element
Hello -
I would like to do this:
<property name="testInterp" value="clean, compile"/>
<target name="all" depends="${testInterp}"/>
I get this error:
Target "${testInterp}" does not exist in the project "XXX". It is used
from target "all".
Does variable interpolation work in this context?
Thanks for any comments,
Bill
--
View this message in context: http://www.nabble.com/variable-interpolation-in-depends-attr-of-target-element-tf4269910.html#a12152873
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
Re: variable interpolation in depends attr of target element
Posted by Dominique Devienne <dd...@gmail.com>.
On 8/14/07, joe7pak <bi...@pobox.com> wrote:
> I would like to do this:
>
> <property name="testInterp" value="clean, compile"/>
> <target name="all" depends="${testInterp}"/>
>
> I get this error:
> Target "${testInterp}" does not exist in the project "XXX". It is used
> from target "all".
>
> Does variable interpolation work in this context?
Nope. No can do. But you can write:
> <property name="testInterp" value="clean, compile"/>
<target name="clean" unless="no-clean" />
<target name="compile" if="do-compile" />
<target name="all" depends="clean, compile"/>
and set or not the no-clean and do-compile properties (it's the
propery existence that matters, not its value).
Ant is declarative, so dependencies must be statically declared. --DD
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: variable interpolation in depends attr of target element
Posted by Martin Gainty <mg...@hotmail.com>.
since property is immutable the only way I know how is to assign the target
based on JavaScript target.setName(attributes.get("name"));
http://mail-archives.apache.org/mod_mbox/ant-user/200401.mbox/%3CD6525D6FD150E141BFEE2789D76F911E02CE19BE@ca-exch01.actional.com%3E
Anyone ?
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "joe7pak" <bi...@pobox.com>
To: <us...@ant.apache.org>
Sent: Tuesday, August 14, 2007 5:47 PM
Subject: variable interpolation in depends attr of target element
>
> Hello -
>
> I would like to do this:
>
> <property name="testInterp" value="clean, compile"/>
> <target name="all" depends="${testInterp}"/>
>
> I get this error:
> Target "${testInterp}" does not exist in the project "XXX". It is used
> from target "all".
>
> Does variable interpolation work in this context?
>
> Thanks for any comments,
> Bill
>
>
> --
> View this message in context:
> http://www.nabble.com/variable-interpolation-in-depends-attr-of-target-element-tf4269910.html#a12152873
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org