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

Allow multiple options to be passed to compiler for options not supported by the compiler mojo

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Auto Closed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Maven version: 2.0.7

      Description

      Look at the mail thread in maven user group:
      http://www.nabble.com/Not-able-to-pass-multiple-arguments-to-javac-tf4857909s177.html

      User may have to pass options to the underlying compiler that are not yet supported by the mojo. Current implementation of the maven-compiler-plugin allows user to specify only one option. Neither of the following techniques work:
      <configuration>
      <compilerArgument>-proc:none</compilerArgument>
      <compilerArgument>-implicit</compilerArgument>
      </configuration>

      or

      <configuration>
      <compilerArgument>-proc:none -impicit</compilerArgument>
      </configuration>

      In the first approach, only one of the compilerArgument is considered, in the second approach since maven quotes the argument, it ends up as a single argument to javac and hence becomes an invalid option.

      The best suggestion is to allow multiple compilerArgument – may be something like:
      <compilerArguments>
      <compilerArgument/>
      <compilerArgument/>
      </compilerArguments>

        Attachments

        1. MCOMPILER-62-2.3.2.patch
          0.9 kB
          Artem Melentyev
        2. MCOMPILER-62-2.3.2.patch
          0.8 kB
          Artem Melentyev
        3. MCOMPILER-62.patch
          0.9 kB
          Igor Vaynberg

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sahoo Sahoo
              • Votes:
                17 Vote for this issue
                Watchers:
                18 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: