Skip to content

[POC] Provide the resolver via Java ServiceLoader - #584

Open
laeubi wants to merge 1 commit into
apache:masterfrom
laeubi:resolver-service-loader
Open

laeubi wants to merge 1 commit into
apache:masterfrom
laeubi:resolver-service-loader

Conversation

@laeubi

@laeubi laeubi commented Oct 29, 2026 •

Copy link
Copy Markdown

Makes the Felix resolver discoverable with java.util.ServiceLoader.

  • Add a public no-arg ResolverImpl() constructor (error-level logging)
  • Register it in META-INF/services/org.osgi.service.resolver.Resolver
  • Add ServiceLoaderTest

This is a showcase for the proposed OSGi spec change that requires resolvers to be discoverable via Java SPI (osgi/org.osgi.service.resolver#43).

The change is useful independently of that proposal: the spec does not forbid it, so it can be merged regardless of the OSGi outcome. Tools can then obtain the resolver without OSGi and without referencing the implementation class.

No JIRA issue yet; happy to create one if this is accepted.

Add a public no-arg ResolverImpl constructor and register it in
META-INF/services/org.osgi.service.resolver.Resolver, so tools can
obtain the resolver without OSGi or a hard reference to the class.

Showcase for the proposed OSGi spec change in
osgi/org.osgi.service.resolver. No JIRA issue yet.

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