ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hayes, Peter" <>
Subject RE: Obtaining properties
Date Tue, 03 Apr 2001 21:06:02 GMT
I am trying to write this so that it works in all cases.  I just actually
created a new task (property2) that looks for these 'recursive' property
situations and it just recurses when it find one.  This way it can go to any
nested level of properties and still work.  I just did it, but I 'll include
the source for it.  It is the same property class with a couple small
changes.  I think this would be a nice thing to have in the next release.


-----Original Message-----
From: Diane Holt []
Sent: Tuesday, April 03, 2001 4:50 PM
Subject: Re: Obtaining properties

I can't think of any way right off-hand to do what you want (doesn't mean
there isn't a way, just that I can't think of one real quick :) -- but
wouldn't it be easier to just set "main" to "${project}" and
define ${project} with -Dproject="Project1"?


--- "Hayes, Peter" <> wrote:
> I would like to obtain a property by using another property to get it.
> I have a prop file like this
> ---------------------
> =
> =
> ---------------------
> In my build.xml I would like to figure out which project to run based on
> a passed in property.  (-Dproject=proj1)
> So in my target would be something like
> <property name="main" value="${project}.run.main" />
> But instead of main being set to the string "" I would
> like to 'dereference' that so it would get the previously set value
> ('') 
> Is this possible w/ ANT
> Thanks.
> Peter Hayes
> GETT, Fidelity Investments


Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.

View raw message