You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/11 16:59:00 UTC

[jira] [Commented] (MCOMPILER-306) Incorrect `compilerArgs` example usage

    [ https://issues.apache.org/jira/browse/MCOMPILER-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682934#comment-16682934 ] 

ASF GitHub Bot commented on MCOMPILER-306:
------------------------------------------

Stephan202 opened a new pull request #9: [MCOMPILER-306] Fix `compilerArgs` example usage
URL: https://github.com/apache/maven-compiler-plugin/pull/9
 
 
   This is a resubmission of PR apache/maven-plugins#126.
   
   I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Incorrect `compilerArgs` example usage
> --------------------------------------
>
>                 Key: MCOMPILER-306
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-306
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.6.2
>            Reporter: Stephan Schroevers
>            Priority: Major
>
> The {{compilerArgs}} property documentation [contains|https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerArgs] this example usage:
> {code:xml}
> <compilerArgs>
>   <arg>-Xmaxerrs=1000</arg>
>   <arg>-Xlint</arg>
>   <arg>-J-Duser.language=en_us</arg>
> </compilerArgs>
> {code}
> But setting {{<arg>-Xmaxerrs=1000</arg>}} causes:
> {noformat}
> 	...
> Caused by: java.lang.IllegalArgumentException: invalid flag: -Xmaxerrs=1000
> 	at com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:206)
> 	at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:156)
> 	at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:107)
> 	at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:64)
> 	at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:125)
> 	... 16 more
> {noformat}
> This does work:
> {code:xml}
> <compilerArgs>
>   <arg>-Xmaxerrs</arg>
>   <arg>1000</arg>
> </compilerArgs>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)