ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Longman <cra...@begeek.com>
Subject Re: global properties
Date Thu, 20 Sep 2001 17:10:12 GMT
On Thu, 2001-09-20 at 13:00, Diane Holt wrote:
> Could you explain what it is you're actually trying to do?  Are you trying
> to run only one of either target1 or target2 (ie., if target1 was run,
> don't run target2, and vice-versa)?

i'm trying to ensure that ONLY target1 OR target2 are executed, that's
correct.

> I'm not clear on why you're setting both use.target1 and use.target2 to
> "true" and then if'ing on them in their respective targets -- how would
> the if ever fail?

both are being set just to see if it fails.  under normal conditions, i
would only set one of them, having more than one set would be cause for
an error.

> As for perpetuating a property set during an <antcall> (or <ant>), you can
> use the <propertyfile> task in the called targets to write the properties
> out to a property file, which then gets read in before the other target is
> called (but again, I'm still not clear on what the various properties
> you're setting are really for [eg., why prop1 and prop2 in both target1
> and target2?]).

prop1 is just a flag to determine whether the targets have been
executed.  it was just a way of having something check if it was already
set and if so, assume that the initialization has already been
completed.  prop2 just represents a property that i am actually
interested in have ONE of the two targets configure.

the property file sounds like it might work.  it seems a little heavy
handed just to have a darn property being set.  i guess it might work
though.  i'm also looking at the source to see if i can make a
'inheritChild' option for ant/antcall so that this problem goes away.

make sense?

cheers,

     CraigL->Thx();




Mime
View raw message