ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: nested properties anyone?
Date Thu, 15 Aug 2002 17:41:14 GMT
Bouncing around in my head is an idea that you might
be able to work around by echoing properties files
out, then reading them back in.  This is really messy
though.

-Matt

--- bo@spamcop.net wrote:
> 
> That is entirely possible, I also looked trough the
> code, and it's not
> supported, period. 
> However here are two questions:
> 
> 1. Why?
> 2. What is a work around?
> 
> Bob. (Just trying to get my work done)
> 
> Quoting James Krygowski <james.krygowski@shaws.com>:
> 
> > Hi Bob-
> > 
> > I believe that the documentation suggests that
> nested properties are not
> > supported.
> > 
> > Jim
> > 
> > > -----Original Message-----
> > > From: bo@spamcop.net [mailto:bo@spamcop.net]
> > > Sent: Thursday, August 15, 2002 1:18 PM
> > > To: Ant Users List
> > > Subject: Re: nested properties anyone?
> > >
> > >
> > > Sorry the line actually should read
> > >
> > > <property name="build.host"
> value="${${hostname}}"/>
> > >
> > > And it doesn't work this way ether
> > >
> > > Bob
> > >
> > > Quoting bo@spamcop.net:
> > >
> > > > Problem:
> > > > From the list of the predefined properties
> key=value select one based
> > on
> > > > the
> > > > value of some other property and use it as a
> default
> > > >
> > > > Example:
> > > > I have a list of servers (hosts.properties),
> where key is an actual
> > > > hostname
> > > > (obtained from hostname command) and value is
> a domain, e.g.
> > > > host_one=host_one.somewhere.com
> > > > host_two=host_two.some.place.else.com
> > > > I want to determine on which machine I'm
> running the script and
> > > use a full
> > > > domain name further in the script.
> > > >
> > > > Solution?
> > > > 1. <property file="hosts.properties"/>
> > > > 2. <exec outputproperty="hostname"
> executable="hostname"/>
> > > > 3. Now I have a ${hostname} and I want to
> assign its value to
> > > the property
> > > > build.host that I use in my script. My first
> reaction was to do this:
> > > > <property name="build.host"
> refid="${${hostname}}"/>
> > > > Well it didn't work because curleys are
> evaluated only once and
> > > I'm getting
> > > > the
> > > > value of build.host literaly as "${hostname}"
> > > > Is there any other way? Any way?
> > > > And I think that it would be nice feature to
> reevaluate the
> > > nested brackets
> > > >
> > > > Bob Stone
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:ant-user-help@jakarta.apache.org>
> > >
> > >
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> > 
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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


Mime
View raw message