ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morten Mortensen <>
Subject Q: Implementing "conditions"
Date Wed, 30 Jul 2003 19:47:46 GMT

Hi All,

Regarding the "condition"-framework, I miss stuff like "is-file" and
"is-dir". Hence I have implemented these as regular tasks setting a property
and then used the condition-framework to branch on the values of these.

But I would like e.g. "is-file" and "is-dir" to be conditions, that is,
looking at the API, my guess is, that they should implement the interface
"" and its "eval()"-method.

But the "ConditionTask" - or its super "ConditionBase" - contains
"add"-methods *SPECIFIC* to the specific conditions  "IsTrue", "IsSet",
"Equals", etc. (I am looking at
t/taskdefs/condition/ConditionBase.html). Does this mean, that the
"Condition"-class is not at all generic and that one can not add ones own
conditions and have them operate as part of "<condition>" and
sf.ant-contrib's "<if>"??

I notice, that "addCondition()" is added to 1.6. Is this to loosen up? -Then
e.g. "addIsTrue()" should have been marked deprecated in the API??

Is there a discussion of this, somewhere? "How to implement your own


Med venlig hilsen 
  Morten Sabroe Mortensen 
  TietoEnator A/S, Ved Lunden 12, 8230 Åbyhøj, Danmark

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message