ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: How can I have Ant replace unset properties as just empty string
Date Fri, 29 Mar 2002 22:39:02 GMT
--- Drew Davidson <> wrote:
> I want to specify a single value [...] that can then have other
> properties construct property names and evaluate them [...] Hence
> recusively defined variables.

The ant-contrib <propertycopy> task is what you're looking for. Source is
available from Sourceforge, or I can send you a jar that has all the
ant-contrib tasks already compiled.

> Also, as to the original thread, I think that the fact that a property
> is undefined should be usable (as it is currently with the if= and
> unless=) and that the value should always expand to nothing when
> referenced.

While that might look prettier in your <echo> example, I'm not sure it
wouldn't have the potential for some disastrous backfires. (The fact that
I can't think of a how at the moment doesn't mean there couldn't be --
just means I'm not feeling all that imaginative :)

In any case, you can always test all your critical properties for being
set before referencing any of them, and bail if any of them aren't.



Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message