Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Environment:Maven version: 2.0.7
-
Number of attachments :
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>
Issue Links
- is related to
-
MCOMPILER-135
Passing multiple parameters to Java 6 annotation processors with javac does not work
-
To be more precise, the Plexus Compiler and more specific, the Plexus CommandLine and Shell classes quotes each argument. Maybe also a suggestion for the Maven debug statement, which ommits these quotes. (It creates an own version of the commandline and output it) Show the real arguments given to javac.
I can try to create a patch for the
<compilerArguments>
<compilerArgument/>
<compilerArgument/>
</compilerArguments>
solution. Is this the best solution?