You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Anthony Baldocchi (JIRA)" <ji...@apache.org> on 2017/10/14 07:52:00 UTC
[jira] [Commented] (MCOMPILER-291) No possible use compilerArgs arg
"-J--add-opens" multiple times
[ https://issues.apache.org/jira/browse/MCOMPILER-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16204527#comment-16204527 ]
Anthony Baldocchi commented on MCOMPILER-291:
---------------------------------------------
In my testing with --add-opens it was only successful with syntax like
{noformat}
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
{noformat}
possibly because of [JDK-8166438|https://bugs.openjdk.java.net/browse/JDK-8166438].
> No possible use compilerArgs arg "-J--add-opens" multiple times
> ---------------------------------------------------------------
>
> Key: MCOMPILER-291
> URL: https://issues.apache.org/jira/browse/MCOMPILER-291
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Affects Versions: 3.6.1
> Reporter: Pascal Schumacher
>
> I'm trying to a project with uses lombok to work with java 9.
> {code}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.6.1</version>
> <configuration>
> <source>1.8</source>
> <target>1.8</target>
> <fork>true</fork>
> <compilerArgs>
> <arg>-J--add-opens</arg><arg>-Jjdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
> <arg>-J--add-opens</arg><arg>-Jjdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
> <arg>-J--add-opens</arg><arg>-Jjdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
> <arg>-J--add-opens</arg><arg>-Jjdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
> <arg>-J--add-opens</arg><arg>-Jjdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
> <arg>-J--add-opens</arg><arg>-Jjdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
> <arg>-J--add-opens</arg><arg>-Jjdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
> <arg>-J--add-opens</arg><arg>-Jjdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
> <arg>-J--add-opens</arg><arg>-Jjdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
> </compilerArgs>
> </configuration>
> </plugin>
> {code}
> {code}mvn -X compile{code} shows me that the {code}-J--add-opens{code} arguments are collapsed:
> {code}
> cmd.exe /X /C ""C:\Program Files\Java\jdk-9\bin\javac.exe" @C:/Users/User/random-beans/random-beans/target/classes/org.codehaus.plexus.compiler.javac.JavacCompiler9403484282707867963arguments -J--add-opens -Jjdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED -Jjdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -Jjdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -Jjdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED -Jjdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -Jjdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED -Jjdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED -Jjdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -Jjdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"
> {code}
> which results in:
> {code}Error: Main Class jdk.compiler.com.sun.tools.javac.util=ALL-UNNAMED could not be found or load{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)