[ http://jira.codehaus.org/browse/MCOMPILER-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=265487#action_265487 ]
Christian Semrau commented on MCOMPILER-62: ------------------------------------------- I just noted that the documentation at http://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html is currently telling me that giving multiple arguments as the value of a {{<compilerArgument>}} element is valid, which is not true. "For such arguments, the Compiler Plugin's compilerArguments will be used." Note the plural, which is not used in the following code snippet! {code:title=pass-compiler-arguments.html} ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <compilerArgument>-verbose -bootclasspath ${java.home}\lib\rt.jar</compilerArgument> </configuration> </plugin> {code} > Allow multiple options to be passed to compiler for options not supported by > the compiler mojo > ---------------------------------------------------------------------------------------------- > > Key: MCOMPILER-62 > URL: http://jira.codehaus.org/browse/MCOMPILER-62 > Project: Maven 2.x Compiler Plugin > Issue Type: Improvement > Environment: Maven version: 2.0.7 > Reporter: Sanjeeb Sahoo > Attachments: MCOMPILER-62-2.3.2.patch, MCOMPILER-62-2.3.2.patch, > MCOMPILER-62.patch > > > 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> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira