5

I'm packaging an application of mine in a single jar using the One-Jar tool:

http://one-jar.sourceforge.net/

It works nike, but I have a problem with a service implemented in a dependency module, which is implemented in a separate jar.

The module uses the standard Java ServiceLoader mechanism to provide its service i.e. the jar has a file META-INF/services/package.name.ServiceProviderClass which specifies the service concrete class to be instantiated.

BUT when this jar is embedded in the application "fat-jar", created by One-Jar, the the service it is NOT discovered by the service loader mechanism.

Any idea how to make it work?

Cheers, Paolo

pditommaso
  • 3,186
  • 6
  • 28
  • 43

1 Answers1

2

At the end I solved this problem by using Capsule packaging in place of One-jar

http://github.com/puniverse/capsule

Enjoy

pditommaso
  • 3,186
  • 6
  • 28
  • 43