ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason <jason...@yahoo.com>
Subject RE: Problem with Environment Variables on Win2000
Date Wed, 28 Sep 2005 13:16:10 GMT
Thanks for testing it.  After I posted, it started
working on my Win2000 box as well so it's strange. 
Actually, this is not a new problem for me; I've run
into it several times over the last couple of years. 
On windows, sometimes it works and sometimes it
doesn't.  I thought that this time it was finally
reproducable but no dice.  Oh well, it remains a
mystery.  Thanks again.

-jason

--- "Dick, Brian E." <Brian.Dick@FMR.com> wrote:

> It works on XP.
> 
> --- rant.bat
> 
> setlocal
> set foo=bar
> call ant
> echo on
> Endlocal
> 
> --- build.xml
> 
> <project>
>    <property environment="env"/>
>    <echo>env.foo is ${env.foo}</echo>
> </project>
> 
> --- output
> 
> C:\Projects\My Tools>rant
> 
> C:\Projects\My Tools>setlocal
> 
> C:\Projects\My Tools>set foo=bar
> 
> C:\Projects\My Tools>call ant
> Buildfile: build.xml
>      [echo] env.foo is bar
> 
> BUILD SUCCESSFUL
> Total time: 0 seconds
> 
> C:\Projects\My Tools>endlocal
> 
> C:\Projects\My Tools>
> 
> 
> 
> -----Original Message-----
> From: Jason [mailto:jasonriz@yahoo.com] 
> Sent: Tuesday, September 27, 2005 2:34 PM
> To: user@ant.apache.org
> Subject: Problem with Environment Variables on
> Win2000
> 
> 
> Hello,
> 
> I've written an ant script on Linux and I'm now in
> the
> process of trying to run it on windows and I've hit
> a
> snag.  My general strategy is to launch ant on linux
> from a shell script in which I set several
> environment
> variables like so:
> 
> export MY_VAR=foo
> 
> I than access these values through ant using the
> <property environment="env"/> mechanism.  On linux
> things work fine but when I port my shell script to
> a
> bat file there are problems.  I am unable to access
> the value of (for example) MY_VAR even though I've
> set
> it in the bat file like so:  SET MY_VAR=foo.  I've
> noticed that I am able to access 'standard'
> environment variables (eg, Path) but the ones I set
> explicity in the bat file which launches ant aren't
> recongised.  Should this work?  Is there some work
> around?  If anyone could set me straight, I'd
> appreciate it.
> 
> -jason
> 
> 
> 		
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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


Mime
View raw message