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

AntBuilder doesn't call Tasks nested in TaskContainers properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-8
    • 1.0-beta-8
    • None
    • None
    • JDK 1.4.2_05, Ant 1.6.2, Windows XP

    Description

      The adding of nested Ant Task works differently for "usual" Tasks and Tasks that implement the "TaskContainer" interface. For the latter, the method "addTask" has to be called, instead of "add<NestedType>". Execution of the nested Tasks should be delegated to the TaskContainer since it is his responsibility.
      Test:

      The Parallel Task implements TaskContainer:
      void testParallelTask(){
      ant = new groovy.util.AntBuilder()
      task = ant.parallel()

      { ant.echo(message:'groovy') }

      assert !task.dump().contains('nestedTasks=[]')
      }

      Attachments

        1. TaskContainerTests-groovy-core.zip
          30 kB
          Dierk König
        2. Task-Container-patch.txt
          6 kB
          Dierk König

        Activity

          People

            codevise Dierk König
            codevise Dierk König
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3h Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 6h
                6h