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

Nested javac Ant task does not do property substitution on its attributes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6-beta-2
    • 1.6.4, 1.7-beta-1
    • Ant integration
    • None

    Description

      If using groovyc with an embedded javac it is no longer possible to use Ant property substitution on the javac attributes.

      For example having a call to groovyc like this:

      <groovyc destdir="build" srcdir="src">
      <javac source="${javac.source}" target="${javac.target}" debug="${javac.debug}" encoding="UTF-8"/>
      </groovyc>

      will lead to this error:

      [groovyc] javac: invalid source release: ${javac.source}

      This works fine with Groovy 1.5.7

      I have attached a simple test case with a build.xml file which loads an external build.properties and then attempts to compile a single Java file.
      To test simply edit the build.properties file to point groovy.home at a relevant Groovy installation.
      Pointing it a my 1.6 b2 fails but 1.5.7 works.

      I wasn't sure how to turn this into a Junit test easily though.

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              ssowerby Steve Sowerby
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: