ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Johnson" <jeff.john...@digeo.com>
Subject RE: Access to Environment Variables other than ANT_HOME of CLASSP ATH
Date Thu, 20 Mar 2003 19:28:43 GMT
Here's a little trick I learned from Erik Hatcher (http://www.ehatchersolutions.com/JavaDevWithAnt/ant.html):

<!-- Get environment variables. -->
<property environment="env"/>

<!-- Set Win32 environment variables to Unix equivalents. -->
<property name="env.USER"     value="${env.USERNAME}"/>
<property name="env.HOSTNAME" value="${env.COMPUTERNAME}"/>
<property name="env.PATH"     value="${env.Path}"/>

<echo/>
<echo>Environment Variables:</echo>
<echo/>
<echo>ANT_HOME  = ${env.ANT_HOME}</echo>
<echo>JAVA_HOME = ${env.JAVA_HOME}</echo>
<echo>CLASSPATH = ${env.CLASSPATH}</echo>
<echo>USER      = ${env.USER}</echo>
<echo>HOSTNAME  = ${env.HOSTNAME}</echo>
<echo>PATH      = ${env.PATH}</echo>

- Jeff

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Wednesday, March 19, 2003 11:18 PM
To: user@ant.apache.org
Subject: Re: Access to Environment Variables other than ANT_HOME of
CLASSP ATH


On Wed, 19 Mar 2003, Alexey Solofnenko <A.Solofnenko@mdl.com> wrote:

> But <property environment> is not very useful, because it is case
> sensitive

Which makes it useful on systems with case sensitive environment
variables 8-)

Stefan

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


Mime
View raw message