Interface RepositoryKeyResolver

All Known Implementing Classes:
SiblingRepositoryKeyResolver
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RepositoryKeyResolver
Maps a Maven MavenCoordinate to the RepositoryKey of the repository that produces it (IKE-Network/ike-issues#496 part C).

A coordinate alone cannot key the cascade graph: a single reactor (one repository, one <scm>) publishes many coordinates, and the cascade releases the repository as one unit. To collapse coordinates onto their producing repositories the assembler runs each coordinate through a resolver and groups nodes by the returned key.

Implementations vary by execution context. A workstation goal looking at a workspace of sibling checkouts uses SiblingRepositoryKeyResolver; a CI agent with one repo checked out resolves through Maven artifact resolution; a cross-workspace cascade may consult the project registry (IKE-Network/ike-issues#497).

  • Method Details

    • resolve

      Optional<RepositoryKey> resolve(MavenCoordinate coordinate)
      Returns the RepositoryKey of the repository that produces a coordinate, or empty if the coordinate cannot be located.
      Parameters:
      coordinate - the upstream's coordinate
      Returns:
      the producing repository's key, or empty if unknown
    • resolve

      default Optional<RepositoryKey> resolve(String groupId, String artifactId)
      Convenience overload — wraps the two-String pair into a MavenCoordinate and delegates. Returns empty when either component is missing.
      Parameters:
      groupId - the upstream's groupId
      artifactId - the upstream's artifactId
      Returns:
      the producing repository's key, or empty if unknown or if either coordinate component is null/blank