Update jpackage to not include service bindings by default

XMLWordPrintable

    • b06
    • generic
    • generic

        JEP 343 & JEP 392 both specify that jpackage by default does not include service providers unless --bind-services is included. This should be fixed to match the JEP and there is no difference in behavior with a linkable runtime or non-linkable.

        JEP 493 introduced the possibility to have a JDK without JMODs (linkable runtime). JDK builds with JEP 493 enabled don't include JMODs and has some restrictions, such as jdk.jlink cannot be included in a target runtime. Thus, this results in failures such as this one when attempting to use jpackage on a JEP 493 enabled JDK:

        $ jpackage --dest test/output2 --name JLinkOptionsTest --input test/input --type app-image --module-path ./test/input --main-jar hello.jar --main-class com.other.Hello
        jlink failed with: Error: This JDK does not contain packaged modules and cannot be used to create another image with the jdk.jlink module

        Since jpackage by default uses an ALL-DEFAULT token when generating a runtime via jlink, the automatic service binding is problematic as that includes jdk.jlink module since it provides tools such as jlink and jmod via the ToolProvider API.

              Assignee:
              Severin Gehwolf
              Reporter:
              Severin Gehwolf
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: