Review Request: JDK-8174826 jlink does not provide support for linking in service provider modules

Mandy Chung mandy.chung at oracle.com
Wed Mar 22 19:11:49 UTC 2017


Webrev:
  http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8174826/webrev.00/

This is a proposal to resolve the open issue listed in JEP 282
about jlink and service binding.

jlink does not do service binding by default as it may be confusing
to the users. To link in service providers, users have to determine
the provider modules to be added at link time.

The proposal is to continue not to do service binding by default
since full service binding may possibly cause many modules to be
linked in, which would surprise many users.  Provide the following
jlink options to make it easier to cope with services when linking:
 
$ jlink --help
  :
      --bind-services                   Do full service binding
 
      --suggest-providers [<name>,...]  Suggest providers of services used by
                                        the modules that would be linked, or
                                        of the given service types
 
  -v, --verbose                         Enable verbose tracing
 
Some sample output that will show with and without —-bind-services
 http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8174826/jlink.verbose.txt
 http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8174826/jlink.suggested.providers.txt
   - The providers are sorted by the service type name and then the 
     provider's module name.

When —-bind-services is specified with —-suggest-providers, no
additional provider will be suggested.

Thanks
Mandy


More information about the jigsaw-dev mailing list