ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Vogel <>
Subject FW: how to set environment variable
Date Mon, 14 May 2001 17:49:10 GMT

-----Original Message-----
From: Peter Vogel 
Sent: Monday, May 14, 2001 10:41 AM
To: ''
Subject: RE: how to set environment variable

Within a task:

<env name="foo" value="bar">

Will set an environment variable with the name foo and value bar
in the environment of the task that includes the env element.  The
documentation and my interpretation of the code seem to disagree as
to whether the presence of an env tag completely empties the environment
for the process invoked by the tag or not, the docs say it does, the code
seems to suggest a "newenvironment" attribute on tasks that would specify
whether a new environment is needed or not, but I may have missed

Personally, I think environment management is one of those things that
needs some significant improvement in ant and I began some hacking on
that very concept on Friday.  Basically, what I'm thinking of right
now (for ease of implementation) is another attribute on a property tag
called "export" if that property should be exported to the environment of
all processes.  I'll let you know how it goes...


> -----Original Message-----
> From: robby []
> Sent: Monday, May 14, 2001 1:25 AM
> To:
> Subject: how to set environment variable
> Hi all,
>      I'm a new user of ant, just want to know what the tag i need 
> to use to set an environment variable in windows. it works just
> as typing 
>          set a=b 
> in Dos prompt.
>      Can anyone help me? thanks.
> robby
> _________________________________________________________
> Do You Yahoo!?
> Get your free address at

View raw message