ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: Accessing system variables
Date Wed, 23 Oct 2002 16:56:12 GMT

----- Original Message -----
From: "Erik Hatcher" <>
To: "Ant Users List" <>
Sent: Tuesday, October 22, 2002 6:48 PM
Subject: Re: Accessing system variables

> <property environment="env"/> will give you ${env.ANT_HOME}, but you'd
> be better off using ${ant.home}.
> Follow it with:
>      <property name="env.COMPUTERNAME" value="${env.HOSTNAME}"/>
> And you'll get the computer name on both Windows and *nix platforms.
> Two caveats to the above that I know of:
> - IDEA IntelliJ does not set ${ant.home} (at least not in my version) so
> I have a fall back setting of it in my build files.
> - Mac OS X does not have HOSTNAME set, although I just this very minute
> realized that there is a HOST environment variable!  Maybe that will
> solve my problems by adding another property setting statement or
> something like that.

ahh, but is it an accurate value or just 'localhost'; I believe that was the
problem with macos.

There is that <hostname> thing in proposals/http that needs to be revived.
Indeed, time to revive that whole little suite of useful http things and
bind to httpclient.jar so they work reliably.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message