ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schmetzer <>
Subject Re: Reading environment variables in ant script directly
Date Wed, 30 Dec 2009 18:28:13 GMT
2009/12/30 Raja Nagendra Kumar <>:
> Are u aware of why such explicit  approach was taken rather providing the
> environment properties directly.
> It would be nice, if ant could consider to provide the environment variables
> implicitly including the conventions you mentioned on prefixing them with
> env.

Hi Raja,

That approach wouldn't work well with Ant's immutable properites. It
could lead to bugs that were hard to diagnose, and make build scripts
less portable.

For example, consider an ant script that used a property "libdir",
perhaps something like this:

    <property name="libdir" location="lib"/>

If Ant were to pick up environment variables directly, if this
particular property was defined in the external environment, then that
definition would take precedence, and the build would probably fail,
although the reason would not be immediatly obvious.

Joe Schmetzer
Ant Script Library

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

View raw message