You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2018/01/05 08:06:00 UTC

[jira] [Commented] (IGNITE-6730) Java 9: fix project build procedure

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

Vladimir Ozerov commented on IGNITE-6730:
-----------------------------------------

[~vveider],
Here is what I found when trying to run the project under Java9:
1) The following options should be added to both {{javac}} (to compile) and {{java}} (to run)
{code}
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
{code}
2) When p.1 added, compiler refuses to work out of the box because compiler source/target levels are set to {{1.7/1.8}} in multiple places in the project. I had to change them to {{1.9}} to let compiler work.

*Suggested fix*
1) Review all usages of {{maven-compiler-plugin}} in the projects (~15 items)
1.1) Remove those which are not needed and could be inherited (e.g. why do we need it {{ignite-indexing}}?)
1.2) Make sure that level {{1.8}} is set once and only once for all usages in the parent project properties
2) Introduce {{java9}} module
2.1) Should be activated when Java9 is detected (same as we did that for {{java8}} module earlier)
2.2) Should add aforementioned compiler options [1], so that no additional actions are required from users to compile it

[1] https://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html



> Java 9: fix project build procedure
> -----------------------------------
>
>                 Key: IGNITE-6730
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6730
>             Project: Ignite
>          Issue Type: Task
>          Components: build
>    Affects Versions: 2.3
>            Reporter: Vladimir Ozerov
>            Assignee: Peter Ivanov
>             Fix For: 2.4
>
>
> 1) In most modules compiler level is set to 1.7 explicitly. Should we fix it somehow? See commit {{a450452e}} for reference.
> 2) Most probably we will have separate code flows for Java 7/8 and Java 9. Need to understand how to organize this. Most probably we will have two pluggable modules producing separate JARs, which will be linked in runtime. Any other ideas?



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