ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry V. Streepy, Jr." <stre...@healthlanguage.com>
Subject Re: machine name
Date Mon, 11 Jun 2001 14:22:54 GMT
This was functionality that I was seriously considering writing.  I was
thinking of adding an option to the exec command to place the results
into a property instead of an output file.  After a review of the exec
task code, it looks pretty easy to write an output handler that would do
the property update when the stream was closed.

Before I write this, has anyone else done it?

Thanks.

Peter Vogel wrote:
> 
> Yet another case where the idea I just proposed (to set a property's
> value from the execution of a process) would be useful...
> 
> On windows 2k at least, you could do this:
> 
> <property environment="env"/>
> <property sysname="${env.COMPUTERNAME}"/>
> 
> On unix you could maybe use ${env.HOSTNAME} or, more
> generally uname -n, but at the moment there's no convenient way
> to capture the output of a process in a property.  If you have cygwin
> installed on your windows hosts then uname -n would work regardless
> of where you are, or you could use the os attribute of an exec
> task that had the added capability of putting its output into
> a property...
> 
> -Peter
> 
> > -----Original Message-----
> > From: Nick Davis [mailto:nick_home_account@yahoo.com]
> > Sent: Wednesday, May 23, 2001 9:38 AM
> > To: ant-user@jakarta.apache.org
> > Subject: machine name
> >
> >
> > Hi All,
> >
> > Is there a way to determine the machine name
> > from ANT without writing a new task?
> >
> > Cheers,
> > Nick
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - buy the things you want at great prices
> > http://auctions.yahoo.com/
> >

-- 
Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office)           mailto:streepy@healthlanguage.com
970/626-4425 (fax)              http://www.healthlanguage.com

Mime
View raw message