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
I'm not sure if there're any other reasons but to me it's very obvious so one
can distinguish
${HOMEPATH} vs. ${env.HOMEPATH} as they're clearly 2 different animals, if you
will. How else Ant would know what you mean and how're you magically going to
reference the system environment w/o "env
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
OK, here's a simple repro for anybody looking to do this:
Sorry, should have looked better at the library dependencies. Needed bsf,
logFactory, and js.jar. Thanks again!
From: Eric Fetzer
To: Ant Users List
Sent: Wed, December 30, 2009 9:49:38 AM
Subject: Re: Call a Macrodef using a property?
Thanks Antoine. I h
Thanks Antoine. I haven't used the script task before. I need a little help
on setup though, do you have a link for me. I started by getting bsf.jar in my
path. Once I got that out there, it asked for logFactory. I put that in my
path, now it's asking for EvaluatorException. I'm guessing t
Hello Eric,
you would have to embed a scripting language in ant to do this.
Something like (untested)
Look at the corresponding page in the man
11 matches
Mail list logo