Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-JSR-6
-
Component/s: None
-
Labels:None
-
Environment:All
-
Number of attachments :
Description
I noticed that AntBuilder doesn't handle ConditionTask (FYI,
ConditionTask does not extend Task).
This breaks with a groovy script such as:
ant = new AntBuilder();
//ant.condition("property":"output"){contains([string:"hi",substring:"hi"])};
// Note that equals is a keyword in Java, so pass in Equals (uppercase)
ant.condition("property":"output"){Equals([arg1:"hi",arg2:"hi"])};
//ant.condition("property":"output"){os(["family":"unix"]);};
ant.echo("\${output}")
-------------------------
A patch (diff -u) is in the attachment
This problem persists in CVS 2006-03-16. However the presented patch is not a good solution to the problem. Henry has correctly ascertained that the issue must be to do with the fact that ConditionTask does not extend Task but the code for AntBuilder appears to already deal with this via the use of TaskAdapter.
Further testing in progress...