harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject using environment vars in Ant (was: Re: [jira] Created: (HARMONY-152) Security module native build incorrectly use PATH variable)
Date Mon, 06 Mar 2006 16:58:08 GMT
Matt Benson wrote:
> --- Alexey Petrenko <alexey.a.petrenko@gmail.com>
> wrote:
> 
>> 2006/3/3, Tim Ellison <t.p.ellison@gmail.com>:
>>> How about we just remove references to ENV from
>> the Ant scripts ;-) ?
>>> That sounds like a very strange 'feature' of Ant
>> Why not use environment if it needed and accessible?
>> Even in ant... :)
> 
> Chiming in here to be sure there are no
> misunderstandings RE Ant's inclusion of environment
> variables... Your comment, Tim, sounds as though you
> thought ENV.* were automagically populated.  In fact,
> you must explicitly request this in your buildfile
> [1], and it doesn't matter if you prefix them as ENV.*
> or foobarbaz.* ... :)

Yep, I got that

> Finally, a common workaround (which I would suggest
> using should this issue recur):
> 
> <property environment="ENV" />
> <property name="ENV.PATH" value="${ENV.Path}" />

good idea.

> --if ENV.PATH already exists, it won't be overwritten.
>  If ENV.Path exists, it follows that ENV.PATH does
> not, so the contents of ENV.Path will be assigned to
> ENV.PATH and with one line we have alleviated the W2K
> problem.

I'm kinda allergic to environment vars in build scripts anyways, I'd
much prefer that the scripts were standalone as far as possible.

> HTH,
> Matt

Thanks
Tim

> http://ant.apache.org/manual/CoreTasks/property.html
> 
>> --
>> Alexey A. Petrenko
>> Intel Middleware Products Division
>>
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Mime
View raw message