Oops -- undefined pronoun :) Where I said "It was requested...", I'm
talking about recursive property resolution.
Diane
--- Diane Holt <[EMAIL PROTECTED]> wrote:
> --- "Headley, Bryan" <[EMAIL PROTECTED]> 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?
>
> Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/