Jlink Services
Josiah Noel
josiahnoel at gmail.com
Sun Jun 11 04:31:58 UTC 2023
I know how to use --suggest-providers as well, my issue is that it's
tedious to have to parse the output and manually add each module.
It'd make my workflow a lot simpler if I could just name the service class
and have jlink resolve all the modules that provide it.
On Sun, Jun 11, 2023, 12:06 AM Michał Kłeczek <michal at kleczek.org> wrote:
> Ahh sorry. You know bind services and want to limit the providers.
>
> You can limit the set of observable modules with limit-modules and
> add-modules.
> There is also --suggest-providers option but documentation seems to be
> lacking.
>
> Michał
>
> > On 11 Jun 2023, at 06:01, Michał Kłeczek <michal at kleczek.org> wrote:
> >
> > --bind-services
> >
> > You're welcome :)
> >
> > Michał
> >
> >> On 10 Jun 2023, at 23:03, Josiah Noel <josiahnoel at gmail.com> wrote:
> >>
> >>
> >> Heya, I've been using Jlink lately to create application images, and I
> can't help but notice that I have to add my service provider modules
> manually. The current bind-services flag doesn't help me since I'm only
> interested in a few services and want to keep the image size down.
> >>
> >> Would it be possible to get a sort of "add-services" argument that
> would resolve all modules that provide the given service class?
> >>
> >> I'm thinking of something like:
> >>
> >> ```
> >> jlink --module-path mods --add-modules com.comsumer --add-services
> com.provider.spi.ServiceClass
> >> ```
> >>
> >> --
> >> Cheers, Josiah.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jigsaw-dev/attachments/20230611/93a64864/attachment.htm>
More information about the jigsaw-dev
mailing list