Skip to content

refactor(manifest): give a Maven sibling's jar and test-jar their own ids - #1716

Merged
Jeppe Fredsgaard Blaabjerg (jfblaa) merged 2 commits into
v1.xfrom
jfblaa/maven-sibling-artifact-ids
Nov 12, 2026
Merged

Jeppe Fredsgaard Blaabjerg (jfblaa) merged 2 commits into
v1.xfrom
jfblaa/maven-sibling-artifact-ids

Conversation

@jfblaa

Copy link
Copy Markdown
Contributor

LLM Description written by Claude Code:claude-opus-5-5

The Maven facts extension wrote a reactor sibling's jar and its test-jar under one bare groupId:artifactId:version id. So one record node mixed the two artifacts' scopes, directness and children, and the walk needed special cases for it. Each artifact now has its own coordinate and names the sibling module as its project. The assembler already merges a project's artifacts into its component, as it does for Gradle variants, so the facts are unchanged. On the compat fixture, socket manifest maven output is identical with the old and new extension.

The fixture now pins the per-artifact records:

  • In app, lib's jar is prod and not direct; it comes through mid.
  • lib's test-jar is direct and dev.
  • demo.ext:libdep hangs under the test-jar, not the jar, since mid excludes it from lib.

Maven compat matrix 3.2.5 to 4.0.0-rc-6 green. Suggested in the review of #1711.

Resolves REA-1165.

🤖 Generated with Claude Code

@cursor

cursor Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes how internal Maven dependency nodes are keyed and linked in manifest records, which could affect reachability or component merging if the assembler assumptions are wrong; risk is mitigated by extensive compat smoke and synthetic record tests.

Overview
The Maven socket-facts extension no longer collapses a reactor sibling's jar and test-jar into one bare groupId:artifactId:version node. Each resolved artifact is emitted under its full typed coordinate (as for external deps), with the sibling module's project key on the node row so the assembler can merge artifacts into one component.

Graph walking in SocketFactsRecordsEngine drops the separate visited set and upsert path: deduplication is keyed by externalId, scope/directness/children attach per artifact, and SocketSupport.bareId is removed.

Maven compat fixtures and tests are updated to pin per-artifact behavior (e.g. lib's jar prod via mid, test-jar direct in app, demo.ext:libdep only under the test-jar, inter-module edges on artifact coordinates).

Reviewed by Cursor Bugbot for commit d55deef. Configure here.

… ids

The Maven facts extension wrote both a reactor sibling's jar and its
test-jar under one bare groupId:artifactId:version id, so one record node
mixed the two artifacts' scopes, directness and children, and the walk
needed special cases for it. Each artifact now has its own coordinate and
names the sibling module as its project; the assembler already merges a
project's artifacts into its component, as it does for Gradle variants,
so the facts are unchanged.

Resolves REA-1165.
…es them

Check that lib's jar is prod in app itself, not just in mid, and that
mid's edge reaches it there; check liba's jar both names liba and has no
file record. Read a coordinate's project without assuming a node row.
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) merged commit bce3f0e into v1.x Nov 12, 2026
23 checks passed
@jfblaa
Jeppe Fredsgaard Blaabjerg (jfblaa) deleted the jfblaa/maven-sibling-artifact-ids branch November 12, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants