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

Groovyc task should log build errors at error level, consistent with javac and allowing use of ant -q

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.3.1
    • Ant integration
    • None
    • Patch

    Description

      When failOnError is set, Groovyc currently logs the error at info level and then throws a BuildException. Unfortunately, when running ant with the quiet flag (ant -q), this means that compilation errors aren't displayed, and you're left with a mysteriously failed build with no reason provided. Javac errors are logged at the error level (and visible with -q), so groovyc should be too.

      Strangely, compilation failures are logged at the error level if failOnError is false. I'm uncertain as to why it's currently the way it is. Perhaps the thrown exception used to include the error message and would be presented to the user, but this isn't the case anymore.

      Pull request at https://github.com/groovy/groovy-core/pull/409

      Attachments

        Activity

          People

            paulk Paul King
            lujke Luke Kirby
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: