ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: Best way to get paths either from env vars or properties file ?
Date Thu, 24 Oct 2002 21:23:11 GMT
Hmm, I just spent a little while on this too.  Didn't
occur to me to name the properties in the properties
file with the same environment prefix.  This is much
cleaner than my approach which requires checking for
each property you want with an <isset> <condition>. 
However I still like mine better just because I
wouldn't want to mix names like that... still, it is
effective.

-Matt

--- "Karr, David" <david.karr@attws.com> wrote:
> Ah, ok.  That works.  Thanks.
> 
> > -----Original Message-----
> > From: Dominique Devienne
> [mailto:DDevienne@lgc.com]
> > Sent: Thursday, October 24, 2002 1:35 PM
> > 
> > I didn't say the defaults cannot be set in an
> external 
> > build.properties. 
> > 
> > --- build.xml ---
> > <property environment="env"/>
> > <property file="defaults.properties"/>
> > 
> > <echo message="xyz = ${xyz}"/>
> > 
> > --- defaults.properties ---
> > # Default properties
> > env.XYZ = default
> > 
> > # Mapping to real properties
> > xyz = ${env.XYZ}
> > 
> > Good old 'another level of indirection' ;-) --DD
> > 
> > -----Original Message-----
> > From: Karr, David [mailto:david.karr@attws.com] 
> > Sent: Thursday, October 24, 2002 3:27 PM
> > To: 'Ant Users List'
> > Subject: RE: Best way to get paths either from env
> vars or 
> > properties file ?
> > 
> > Bleah.  It's not worth it then.  Specifying the
> default 
> > locations inside the
> > build.xml, as opposed to the build.properties
> file, is not 
> > ideal.  I guess
> > there's no clean way to get both.
> 
> --
> 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!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.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