Class PublishedArtifactSet
java.lang.Object
network.ike.workspace.PublishedArtifactSet
Scans a Maven subproject root to determine the complete set of
published artifacts (groupId:artifactId pairs).
This is the "published artifact set" from the handoff design: given a subproject root directory, recursively walk the POM hierarchy (root POM plus all subprojects/modules) and collect every groupId:artifactId pair that the subproject publishes.
POM parsing uses simple regex matching (consistent with the
ReleaseSupport pattern) rather than a full XML parser.
The <parent> block is stripped before extracting the
project's own groupId and artifactId; if no groupId is declared
outside the parent block, the parent's groupId is inherited.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA published Maven artifact coordinate. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanmatches(Set<PublishedArtifactSet.Artifact> artifacts, String groupId, String artifactId) Check whether a groupId:artifactId pair is in the published set.static Set<PublishedArtifactSet.Artifact> Scan a subproject root and return the complete set of published artifacts (groupId:artifactId pairs).
-
Method Details
-
scan
Scan a subproject root and return the complete set of published artifacts (groupId:artifactId pairs).Reads the root pom.xml, extracts its coordinates, then recursively descends into each subproject (or module) directory to collect all published artifacts.
- Parameters:
subprojectRoot- the root directory of the Maven subproject- Returns:
- the set of all published artifacts
- Throws:
IOException- if a POM file cannot be read
-
matches
public static boolean matches(Set<PublishedArtifactSet.Artifact> artifacts, String groupId, String artifactId) Check whether a groupId:artifactId pair is in the published set.- Parameters:
artifacts- the set fromscan(Path)groupId- the groupId to checkartifactId- the artifactId to check- Returns:
- true if the pair is in the set
-