ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schmetzer <...@exubero.com>
Subject Re: Reading environment variables in ant script directly
Date Wed, 30 Dec 2009 18:28:13 GMT
2009/12/30 Raja Nagendra Kumar <Nagendra.Raja@tejasoft.com>:
> 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.

Regards,
Joe Schmetzer
Ant Script Library http://www.exubero.com/asl/

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


Mime
View raw message