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

AntBuilder doesn't handle ConditionTask

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0-JSR-6
    • None
    • None
    • All

    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

      Attachments

        1. AntBuilder.java.diff
          6 kB
          Henry Chan

        Activity

          People

            russel Dr. Russel Winder
            hchan Henry Chan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: