ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: Anyway to get Ant to interpolate properties override at the command line?
Date Mon, 13 Nov 2006 19:00:42 GMT
On 11/13/06, robert@elastica.com <robert@elastica.com> wrote:
> Is there anyway to get Ant to interpolate properties lazily when they are
> overriden at the command line?

Neither on the command line, nor in the build file, in the sense that
in both cases, Ant uses the currently defined properties to define the
value of the newly defined properties.

There is currently no support to delay the expanding of properties in
the value to the point of use, as opposed to the point of definition.
Doing so may also not be compatible with the property immutability
rules in Ant.

I don't know for sure, but user properties on the CLI may not even
expand properties at all in fact, so -Dfoo=hello -Dbar="${foo} world",
which could theorically expand bar's value to "hello world", probably
doesn't.

But you can use properties files, and pass these on the CLI, and
assuming all referenced properties are defined in the properties
files, it should resolve them correctly. --DD

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


Mime
View raw message