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

Cannot set "-Werror" javac option when using Groovyc ant task.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.8.5, 2.0-beta-2
    • Compiler
    • None

    Description

      When trying to configure the joint compiler to treat java compile warnings as errors I tried to set the following javac args:

      • -Xlint:all
      • -Werror

      I found that -Xlint:all worked, but -Werror gave me an error saying that it was an unrecognised option. After some digging it seems that the joint compiler prefixes all options bound for javac with -F, which means the lint option was transformed to "-FXlint:all" but the -Werror option didn't get this same transformation. If I manually added the "-F" making it "-FWerror" everything worked as it should.

      I went looking for whereabouts this prefixing gets applied to try and determine why it wasn't happening to "-Werror" but couldn't find it.

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            ldaley Luke Daley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: