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

Build failed with groovyc task but no error message reported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-2
    • 1.0-JSR-2
    • None
    • None
    • JDK 5.0, Ant 1.6.4, Groovy-jsr2-snapshot

    Description

      The groovyc task does not always report error messages, even though the groovyc commandline does. Reproduce as follows:

      Content of Test.groovy:
      c = new X()

      (where X is a non-existing class or one that requires importing from another package.)

      $ ant groovyc
      Buildfile: /home/meling/work/eclipse/jgroup/build.xml

      groovyc:
      Compiling 1 source files to /home/meling/work/eclipse/jgroup/target/classes
      /home/meling/work/eclipse/jgroup/jgroup-experiment/src/main/groovy/jgroup/groovy/experiment/Test.groovy
      compiling: /home/meling/work/eclipse/jgroup/jgroup-experiment/src/main/groovy/jgroup/groovy/experiment/Test.groovy

      BUILD FAILED
      /home/meling/work/eclipse/jgroup/build.xml:867:

      It does not provide the compiler errors.

      Compiling the same class with the groovyc command, I get as expected:

      $ groovyc -d /tmp /home/meling/work/eclipse/jgroup/jgroup-experiment/src/main/groovy/jgroup/groovy/experiment/Test.groovy
      General error during class generation: No such class: X in constructor call for class: Test. At [5:5] /home/meling/work/eclipse/jgroup/jgroup-experiment/src/main/groovy/jgroup/groovy/experiment/Test.groovy

      groovy.lang.MissingClassException: No such class: X in constructor call for class: Test. At [5:5] /home/meling/work/eclipse/jgroup/jgroup-experiment/src/main/groovy/jgroup/groovy/experiment/Test.groovy

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            meling Hein Meling
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: