Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
AntBuilder instantiates task objects directly whereas Ant creates in a first time UnknownElement and RuntimeConfigurable to really create and configure the tasks when they are executed. Tasks may ask these classes to know how they have been configured what is not currently possible using the AntBuilder.
Proposed patch (not in unified diff format as my computer can't access cvs) removes all the instantiation logic to call the Handler Ant uses when it parses an xml file. This reduces drastically the complexity and ensures that the AntBuilder doesn't reinvent the wheel.
Provided unit tests compare the execution of the AntBuilder and the one of Ant to ensure that expectations are correct.
FileScanner is promoted to a real Ant task to make it better fit in the AntBuilder.
Patch fixes Issues 824 too (http://jira.codehaus.org/browse/GROOVY-824) (unit test included),