Uploaded image for project: 'Maven Compiler Plugin'
  1. Maven Compiler Plugin
  2. MCOMPILER-479

Clarify `compilerArgs` Javadoc

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.8.1
    • 3.10.0
    • None

    Description

      The Javadoc for compilerArgs states

      Sets the arguments to be passed to the compiler if fork is set to true.

      However, by looking at the code, it seems the arguments are passed unconditionally (whether fork is enabled or not).

      Our understanding is that the JVM flags (e.g., -J-Duser.language=en_us) are only applicable when fork is enabled. However, compiler arguments (e.g. -Xlint:all) are always passed through.

      As cushon suggests here, maybe we should improve the doc, and/or report a warning/error.

      Perhaps that could be at least clarified in the docs, or maven could report an error if -J is set without fork enabled, or something.

      See also the discussion in google/error-prone#2786.

      Attachments

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              hisener Halil İbrahim Şener
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: