Skip to content

v4 SPI: Add findModel() to WorkspaceReader SPI #13515

Open

Description

@gnodet

Parent: #13499 | Related: PR #13094

Problem

PR #13094 introduces org.apache.maven.api.spi.WorkspaceReader with findArtifact()
and findVersions(). This covers the base WorkspaceReader contract, but the v3
MavenWorkspaceReader interface also provides findModel(Artifact) — which has no
equivalent in the new SPI.

Who needs this

  • Tycho: TychoWorkspaceReader generates synthetic POMs for P2 artifacts that have
    no Maven pom.xml. Without findModel(), the workspace reader can serve artifact files
    but not their models, breaking Tycho's ability to present P2/OSGi bundles as Maven
    dependencies.

What's needed

Add a findModel() method (or equivalent model-provision mechanism) to the v4
WorkspaceReader SPI for extensions that resolve non-Maven artifacts requiring
synthetic model generation.

default Optional<Path> findModel(Artifact artifact) {
    return Optional.empty();
}

🤖 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
  2. added a commit that references this issue on Oct 14, 2026
    4d8998d
  3. codewithsinchana commented on Oct 27, 2026

    @codewithsinchana
    Contributor

    "Hi @gnondet, I'd love to help out with this or provide additional test coverage/implementation if it's still open. Is there anything specific needed here?" This prevents duplicated effort.

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