maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lamy (*$^¨%`£) (JIRA) <j...@apache.org>
Subject [jira] [Updated] (MCOMPILER-306) Incorrect `compilerArgs` example usage
Date Wed, 14 Nov 2018 01:35:00 GMT

     [ https://issues.apache.org/jira/browse/MCOMPILER-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Olivier Lamy (*$^¨%`£) updated MCOMPILER-306:
---------------------------------------------
    Fix Version/s: 3.8.1

> 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
>            Assignee: Olivier Lamy (*$^¨%`£)
>            Priority: Major
>             Fix For: 3.8.1
>
>
> 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)

Mime
View raw message