Skip to content

Resolvers must be discoverable via Java ServiceLoader - #43

Open
laeubi wants to merge 1 commit into
osgi:mainfrom
laeubi:resolver-service-loader
Open

laeubi wants to merge 1 commit into
osgi:mainfrom
laeubi:resolver-service-loader

Conversation

@laeubi

@laeubi laeubi commented Oct 29, 2026

Copy link
Copy Markdown

Moved from osgi/osgi#884, reduced to plain Java SPI. A ResolverFactory and a framework property are not needed.

Resolvers are used outside OSGi runtimes, for example in build tools, IDEs and provisioning agents. Today callers must reference an implementation class.

Changes

  • Resolver javadoc and the spec now require META-INF/services/org.osgi.service.resolver.Resolver and a public no-arg constructor.
  • Package version 1.1.1 → 1.2.0.
  • New TCK test ResolverServiceLoaderTestCase checks the services file of the bundle that provides the Resolver service.
  • The TCK run now includes the 1.2 API bundle.

Proof of feasibility: apache/felix-dev#584

Resolver implementations must ship
META-INF/services/org.osgi.service.resolver.Resolver and have a public
no-arg constructor, so tools can use ServiceLoader outside OSGi.

- Document the requirement in Resolver and the spec
- Bump org.osgi.service.resolver to 1.2.0
- Add a TCK test for the services file

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant