ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Headley, Bryan" <BHead...@universalaccess.net>
Subject RE: Is this a desirable feature?
Date Tue, 22 May 2001 16:25:53 GMT


> -----Original Message-----
> From: Diane Holt [mailto:holtdl@yahoo.com]
> Sent: Monday, May 21, 2001 7:43 PM
> To: ant-dev@jakarta.apache.org
> Subject: Re: Is this a desirable feature?
> 
> 
> --- "Headley, Bryan" <BHeadley@universalaccess.net> wrote:
> > Assume you can deploy to one of several environments. So 
> you set up a
> > variable called 'build.for" that you can pass on the command line to
> > ant.
> >  
> > So, we're looking at,
> >  
> > <property name="app.DEV.deployment.dir" 
> value="/opt/deployment/forDev"
> > />
> > <property name="app.QA.deployment.dir" 
> value="/opt/deployment/forQa" />
> > <!-- fairly simplistic; I might actually use different 
> template files,
> > etc
> > -->
> >     ...
> > <property name="app.deployment.dir"
> > value="${app.${build.for}.deployment.dir}"/>
> >  
> > Does anyone else see the benefit to a recursive propertyName parser?
> >  
> > There's been talk about an IF command; would that be a more 
> acceptable
> > approach? Or am I merely insane?
> 
> It was requested but rejected for Ant2.
> 
> In your case, since you're passing a property on the 
> command-line anyway,
> if you define it as -Dbuild.for="Dev", couldn't you just do:
> 
> <property name="app.deployment.dir"
>           value="/opt/deployment/for${build.for}"/>
> 
> and eliminate those other two properties altogether?
> 

It presupposes that "Dev" is a true suffix, and not just a trivial example.
You see, what I wanted to do is keep all the properties for all the
environments together, so it's easier to proofread / keep their values in
sync.

I may have to work out a directory layout where what you suggest would
work...

> Diane
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 

Mime
View raw message