Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1335

AntBuilder doesn't instantiate Tasks the Ant way

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-JSR-6
    • 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),

      Attachments

        1. AntBuilderPatch.zip
          8 kB
          mguillem

        Activity

          People

            codevise Dierk König
            mguillemot@yahoo.fr Marc Guillemot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: