ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: A question about "available" and doing conditionals in a build xml file.
Date Thu, 18 May 2000 13:24:41 GMT

Nope, you aren't being dim in the slightest.  I was using a different
definition of 'unless' in my head than is being used by the current version
of MatchingClass.NameEntry.  If I'd paid attention to that first, I'd have
used 'unless' instead of 'ifnot'.

The 'condition' property of the Target class is actually being set in
ProjectHelper.configureProject(Project, Element).  If you take a gander a
little more than half way down the method body, you see that the value of
an attribute named 'if' is being stuffed into a String var named
targetCond, and later being used in a call to

Glenn McAllister
TID - Software Developer - VisualAge for Java
IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey

Ummm... sorry if I'm being terribly dim here, but...

<Target name="target" if=""> ... </Target>

gets executed _if_ is set, right?

<Target name="target" unless=""> ... </Target>

gets executed _unless_ is set, ie. if is _not_
set, right?

So doesn't that make 'if' and 'unless' mutually exclusive???

BTW, in the src distro I have (a CVS checkout of about two weeks ago) the
Target class does not have 'if' or 'unless' properties, but has a
'condition' property, and the task gets executed if the property named in
the 'condition' attribute exists. Do I just have an old source distro? Or
is there some strange mapping done between 'if' and 'condition' to avoid
reserved words?

Tom Cook - Software Engineer

"The brain is a wonderful organ. It starts functioning the moment you get
up in the morning, and does not stop until you get into the office."
       - Robert Frost

LISAcorp -

38 Greenhill Rd.          Level 3, 228 Pitt Street
Wayville, SA, 5034        Sydney, NSW, 2000

Phone:   +61 8 8272 1555  Phone:   +61 2 9283 0877
Fax:     +61 8 8271 1199  Fax:     +61 2 9283 0866

View raw message