Skip to content

v4 SPI: Scoped service discovery from plugin classloaders #13516

Closed

Description

@gnodet

Parent: #13499 | Related: #13465, #13223

Problem

There is no v4 API for discovering SPI implementations contributed by a specific
plugin's classloader. Today this requires internal APIs: BuildPluginManager.getPluginRealm(),
MavenPluginManager.getPluginDescriptor(), and PlexusContainer.lookupList() with
thread context classloader switching.

Who needs this

  • Tycho: DefaultPluginRealmHelper discovers Tycho SPI extensions from plugin
    dependencies. For each plugin with tycho-spi in its dependency tree, it switches
    the thread context classloader to the plugin's ClassRealm and performs Plexus lookups
    for SPI implementations. This is Tycho's extensibility model — third-party plugins
    contribute SPI implementations loaded from their class realm.

What's needed

🤖 Drafted with Claude Code (Claude Opus 4.6, interactive mode). Reviewed and confirmed by @gnodet before submission.

Activity

  1. added
    enhancement
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions