Re: ServiceLoader usage in automatic module fails

2017-09-12 Thread Christian Stein
On Mon, Sep 11, 2017 at 2:21 PM, Alan Bateman wrote: > [...] > > You can also use `--show-module-resolution` to get traces at startup and > satisfied yourself that it working correctly. Using the symbolic constant `--add-modules ALL-MODULE-PATH` works even better when scanning module contents

Re: ServiceLoader usage in automatic module fails

2017-09-11 Thread Alan Bateman
On 11/09/2017 12:26, Christian Stein wrote: On Mon, Sep 11, 2017 at 1:17 PM, Alan Bateman wrote: [...] Also can you run with `--add-modules demo` as I assume the scenario you is that "demo" is not resolved (because no modules `requires demo` and no module declares that it uses the service ty

Re: ServiceLoader usage in automatic module fails

2017-09-11 Thread Christian Stein
On Mon, Sep 11, 2017 at 1:17 PM, Alan Bateman wrote: [...] > > Also can you run with `--add-modules demo` as I assume the scenario you is > that "demo" is not resolved (because no modules `requires demo` and no > module declares that it uses the service type that demo provides). > > -Alan > Than

Re: ServiceLoader usage in automatic module fails

2017-09-11 Thread Alan Bateman
On 11/09/2017 11:52, Alan Bateman wrote: : Which JAR file contains the service provider? You mentioned "restoring the class-path and provide a META-INF/services". Does this mean you removed the services configuration file when you had the JAR file on the module path as an automatic module?

Re: ServiceLoader usage in automatic module fails

2017-09-11 Thread Christian Stein
> Which JAR file contains the service provider? The service providing interface [1] is inside the api jar [2]. The service loader code resides in the Jupiter engine [3] jar and looks like [4]. [1] org.junit.jupiter.api.extension.Extension [2] http://central.maven.org/maven2/org/junit/jupiter/juni

Re: ServiceLoader usage in automatic module fails

2017-09-11 Thread Alan Bateman
On 11/09/2017 11:03, Christian Stein wrote: Hi jigsaw team, I discovered an issue with the ServiceLoader trying to load services on the module-path, when the actual ServiceLoader.load() call resides in an automatic module. I compiled a small demo at [1] and it's console output is visible at [

ServiceLoader usage in automatic module fails

2017-09-11 Thread Christian Stein
Hi jigsaw team, I discovered an issue with the ServiceLoader trying to load services on the module-path, when the actual ServiceLoader.load() call resides in an automatic module. I compiled a small demo at [1] and it's console output is visible at [2]. If you want to re-run the demo, just call "j