ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject Re: variable interpolation in depends attr of target element
Date Tue, 14 Aug 2007 22:44:06 GMT
On 8/14/07, joe7pak <> 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:
For additional commands, e-mail:

View raw message