ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: Without dynamic properties, how are you supposed to ...?
Date Thu, 05 Oct 2000 20:08:13 GMT
You can use <antcall> to reset properties. Check the doc for usage. But
NOTE: the doc is out-of-date wrt the example -- it uses <antcall>'s old
name <calltarget>. This should get fixed.

Diane
--- Brad Lyon <ly6@y12.doe.gov> wrote:
> Note: this applies to the latest cvs build of ant, not just 1.1 (which
> had 
> different, but still unuseful, behavior)
> 
> The current default behavior for <property>'s is that you can't override
> 
> their values.  So how are you supposed to set a property to different 
> values based on whether or not another property is defined?  The way I 
> would think you would do it, is something like
> 
> <target name ="setpropsA" if="propforA">
> 	<property name="foo" value ="A">
> </target>
> 
> <target name="setpropsB" if="propforB">
> 	<property name="foo" value ="B">
> </target>
> 
> 
> But this doesn't work, even if property "propforA" is not defined, and 
> "propforB" is.  During the initial xml parsing, it apparently sets
> property 
> "foo" to "A" no matter what, and this can't ever be overridden (except 
> using the hacked ant I have now, which required just two line changes in
> 
> Property.java).
> 
> I'm worried I'm missing the boat somehow.  Am I supposed to be using
> some 
> other method to accomplish what I want?  Something trivial?
> 
> Thanks in advance.
> 
> -Brad


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/

Mime
View raw message