Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2623

Add JPMS (Java Platform Module System) support to TinkerPop

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.5.1
    • None
    • build-release
    • None

    Description

      Please add JPMS (Java Platform Module System) support to TinkerPop.
       
      JPMS was introduced to Java since version 9.
       
      If the application, like mine, uses JPMS, it may suffer form errors similar to "The package java.util is accessible from more than one module: <unnamed>, java.base".
      These error messages are caused by the fact that jars you currently provide are treated as unnamed modules, and when mixed with other unnamed modules from classpath they can easily break the module inheritance hierarchy.
       
      While these errors can be fixed by <exclude> in application POM, they are hard to localize the causing libraries.
      You can still stick to Java 8 codewise, jars compiled with Java 8 work fine with apps that use Java 9 and up.
       
      All you need to avoid such issues is include the following line:
      Automatic-Module-Name: org.apache.tinkerpop.<your-unique-chosen-module-name-for-this-jar>
      to each jar's META-INF/MANIFEST.MF
       
      You can either manually add this line to each MANIFEST.MF, or modify maven-jar-plugin config in POM. See, for example, http://branchandbound.net/blog/java/2017/12/automatic-module-name/ for more details. 
       
      You can also look into org.apache.commons.configuration2 as reference on how to add this manifest entry whill keeping the library with Java 8 .
       
      This would be an easy first step to begin modularization of TinkerPop while sticking to Java 8.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kosulin Vladyslav Kosulin
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: