<div dir="auto">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.<div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">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.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 11, 2023, 12:06 AM Michał Kłeczek <<a href="mailto:michal@kleczek.org">michal@kleczek.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ahh sorry. You know bind services and want to limit the providers.<br>
<br>
You can limit the set of observable modules with limit-modules and add-modules.<br>
There is also --suggest-providers option but documentation seems to be lacking.<br>
<br>
Michał <br>
<br>
> On 11 Jun 2023, at 06:01, Michał Kłeczek <<a href="mailto:michal@kleczek.org" target="_blank" rel="noreferrer">michal@kleczek.org</a>> wrote:<br>
> <br>
> --bind-services<br>
> <br>
> You're welcome :)<br>
> <br>
> Michał <br>
> <br>
>> On 10 Jun 2023, at 23:03, Josiah Noel <<a href="mailto:josiahnoel@gmail.com" target="_blank" rel="noreferrer">josiahnoel@gmail.com</a>> wrote:<br>
>> <br>
>> <br>
>> 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.<br>
>> <br>
>> Would it be possible to get a sort of "add-services" argument that would resolve all modules that provide the given service class?<br>
>> <br>
>> I'm thinking of something like:<br>
>> <br>
>> ```<br>
>> jlink --module-path mods  --add-modules com.comsumer --add-services com.provider.spi.ServiceClass<br>
>> ```<br>
>> <br>
>> -- <br>
>> Cheers, Josiah.<br>
</blockquote></div>