True Antonine.
I clearly understand that using of env is not to be encouraged and ant has a
way to use them with care if one wants.
Infact, our internal Mobile Single Source Build Framework keeps this
principle in very close to keep our self more portable.
However, we still there is a need for
Hello Raja,
some ant scripts need access to environment variables but a lot of them
do not. So this leaves it to each build file developer to decide whether
he wants his ant property environment to include properties.
Now you can create easily a standard build file that you import
everywhere
Sure joe, now I understand why we need to give a prefix. Joe, I was looking
for why ant did not ant make all the environment variables available through
some documented prefix notation rather by default rather than user adding
this line in each build script.
Regards,
Nagendra
--
View this mes
e: Wed, 30 Dec 2009 10:14:14 -0800
> From: nagendra.r...@tejasoft.com
> To: user@ant.apache.org
> Subject: RE: Reading environment variables in ant script directly
>
>
> Thank You Rez,
>
> Are u aware of why such explicit approach was taken rather providing the
> environment
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 wit
Thank You Rez,
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.
Regards,
Raja Nag
In short, no. You can test it for yourself by writing a simple ant script. All
system environment variables have to be preceded by "env.", otherwise, in the
example below ${HOMEPATH} by itself is meaningless unless you have assigned a
prior value to it. But the minute it's preceded by "env." i