You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2017/10/28 08:38:02 UTC

[jira] [Commented] (MCOMPILER-314) Release-Property can not be used with OpenJDK

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

Robert Scholte commented on MCOMPILER-314:
------------------------------------------

Looks to me that you're using either a pre-java9 version to compile or an old Java9-ea version.
If you run with an extra {{-X}} or {{--debug}} you should be able to see what the actual Java version is being used to compile your code.
About a year ago it used to be {{-release}}, but in the meantime they've adopted the gnu-style for the options.
http://openjdk.java.net/jeps/247 clearly says it should be with 2 hyphens.
I don't see it as a plugin bug.


> Release-Property can not be used with OpenJDK
> ---------------------------------------------
>
>                 Key: MCOMPILER-314
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-314
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.7.0
>         Environment: Linux (Ubuntu), OpenJDK 9
>            Reporter: Nils Christian Ehmke
>
> Hi,
> First of all: Thank you for providing us with the maven compiler plugin.
> Now about my issue. I have a project in which I use the release-flag of the maven compiler plugin. My pom contains something like the following in the parent pom:
> {code}
> 	<properties>
> 		<maven.compiler.source>1.9</maven.compiler.source>
> 		<maven.compiler.target>1.9</maven.compiler.target>
> 		<maven.compiler.release>9</maven.compiler.release>
> 	</properties>
> {code}
> Especially the release-flag seems to be necessary so that Eclipse uses the JDK9 libs. Under windows (with an Oracle JDK), this works just fine. However, our build server (under Linux) cannot work with this. It fails with
> {code}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project ...
> Fatal error compiling: invalid flag: --release -> [Help 1]
> {code}
> It seems that the release-flag under Linux/OpenJDK has to be called with a single hyphen and not with two. Is there anything you can do about this? Any workaround maybe?
> Thank you and best regards
>   Nils



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)