Class PomEdgeDeriver
CascadeEdges a project radiates upstream from
its Maven model and on-disk layout (IKE-Network/ike-issues#496
part B).
Replaces the hand-authored release-cascade.yaml as the
source of an IKE project's upstream edges. The cascade specifies
every version-bearing site in an IKE POM as a potential edge, not
just <dependencies>: parent inheritance, plain
dependencies, dependency-management entries (including imported
BOMs), plugins, plugin management, and .mvn/extensions.xml.
Under the ${G·A} property convention the property name an
alignment step rewrites is mechanical
(CascadeEdge.versionProperty()), so no manifest field
declares it — the coordinate is enough.
The deriver emits an edge only for coordinates a
PomEdgeDeriver.CoordinateFilter accepts; the default filter
(PomEdgeDeriver.CoordinateFilter.IKE_GROUP) keeps edges whose
groupId starts with network.ike. Third-party
dependencies stay out of the graph: IKE does not release them, so
they have no place in a release ordering.
A coordinate must bear a <version> at its site to count.
A <dependency> that inherits its version from
<dependencyManagement> contributes no edge from the
dependency site itself; the contributing edge sits at the
<dependencyManagement> entry instead.
Self-edges — where a coordinate's reactor-root repository is the
same repository as the POM the deriver is scanning — are not
filtered here. The deriver knows the POM's coordinates but not its
<scm>, and the same repository can publish many coordinates.
Self-edge filtering happens after the <scm>-keyed node
resolution in IKE-Network/ike-issues#496 part D.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA predicate over aMavenCoordinatethat selects which edges the deriver should emit. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConventional path of a Maven 4 build-extensions descriptor. -
Method Summary
Modifier and TypeMethodDescriptionstatic List<CascadeEdge> deriveEdges(org.apache.maven.api.model.Model model, Path projectDir) Derives the upstream edges of a project from its model and project directory.static List<CascadeEdge> deriveEdges(org.apache.maven.api.model.Model model, Path projectDir, PomEdgeDeriver.CoordinateFilter filter) Derives upstream edges with a caller-supplied coordinate filter.static List<CascadeEdge> deriveEdges(org.apache.maven.api.model.Model model, Path projectDir, PomEdgeDeriver.CoordinateFilter filter, RepositoryKey sourceRepo, RepositoryKeyResolver repositoryResolver) Derives upstream edges and drops self-edges — edges whose target repository, as resolved byrepositoryResolver, equalssourceRepo(IKE-Network/ike-issues#496 part D).
-
Field Details
-
EXTENSIONS_RELATIVE_PATH
Conventional path of a Maven 4 build-extensions descriptor.- See Also:
-
-
Method Details
-
deriveEdges
public static List<CascadeEdge> deriveEdges(org.apache.maven.api.model.Model model, Path projectDir) Derives the upstream edges of a project from its model and project directory.- Parameters:
model- the project's Maven model (typically the file model, but any stage works — the deriver only reads structural fields)projectDir- the project's on-disk root directory, used to locate.mvn/extensions.xml; may benullif the caller knows the project has no extensions descriptor- Returns:
- the derived upstream edges, in the order the sites
appear in the POM (parent, dependencies, depMgmt,
plugins, pluginMgmt, extensions); never
null
-
deriveEdges
public static List<CascadeEdge> deriveEdges(org.apache.maven.api.model.Model model, Path projectDir, PomEdgeDeriver.CoordinateFilter filter) Derives upstream edges with a caller-supplied coordinate filter.- Parameters:
model- the project's Maven modelprojectDir- the project's on-disk root directory; may benullfilter- selects which coordinates produce edges; must not benull- Returns:
- the derived upstream edges, in source-order; never
null
-
deriveEdges
public static List<CascadeEdge> deriveEdges(org.apache.maven.api.model.Model model, Path projectDir, PomEdgeDeriver.CoordinateFilter filter, RepositoryKey sourceRepo, RepositoryKeyResolver repositoryResolver) Derives upstream edges and drops self-edges — edges whose target repository, as resolved byrepositoryResolver, equalssourceRepo(IKE-Network/ike-issues#496 part D).Self-edges are reactor-internal: a project using its own sibling artifact (
ike-toolingconsumingike-maven-plugin,ike-platformconsumingike-workspace-maven-plugin) is a relationship Maven resolves inside the one reactor build, not a cascade edge. Dropping them keeps the topological sort a DAG.An edge whose target the resolver cannot locate is kept conservatively — without information, the deriver does not silently filter it out. Callers can chase the unresolved coordinate themselves.
- Parameters:
model- the project's Maven modelprojectDir- the project's on-disk root directory; may benullfilter- coordinate filter; requiredsourceRepo- the source POM'sRepositoryKey; whennull, no self-edge filtering is performedrepositoryResolver- maps an edge's target coordinate to itsRepositoryKey; whennull, no self-edge filtering is performed- Returns:
- external upstream edges in source-order; never
null
-