groovy

AntBuilder doesn't instantiate Tasks the Ant way

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.0-JSR-6
  • Component/s: None
  • Labels:
    None
  • Testcase included:
    yes
  • Number of attachments :
    1

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),

Activity

Hide
Marc Guillemot added a comment -

Dierk König is working on the patch

Show
Marc Guillemot added a comment - Dierk König is working on the patch
Hide
Dierk Koenig added a comment -

tested with the unit tests and also functionally against the
latest grails SampleGenerator.
Execution and Reporting was all fine.
Thanks a lot to Marc for the great work on the patch
that again cuts down on complexity and LOC !

Show
Dierk Koenig added a comment - tested with the unit tests and also functionally against the latest grails SampleGenerator. Execution and Reporting was all fine. Thanks a lot to Marc for the great work on the patch that again cuts down on complexity and LOC !

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: