Add hierarchical dependency resolution from embedded POM files#4943
Open
Miablo wants to merge 6 commits into
Open
Add hierarchical dependency resolution from embedded POM files#4943Miablo wants to merge 6 commits into
Miablo wants to merge 6 commits into
Conversation
Signed-off-by: Diaz-Santiago, Miosotis <themio@themioshow.com>
Signed-off-by: Diaz-Santiago, Miosotis <themio@themioshow.com>
Signed-off-by: Diaz-Santiago, Miosotis <themio@themioshow.com>
Signed-off-by: Diaz-Santiago, Miosotis <themio@themioshow.com>
Signed-off-by: Diaz-Santiago, Miosotis <themio@themioshow.com>
Signed-off-by: Diaz-Santiago, Miosotis <themio@themioshow.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
pom.xmlfiles in Java archives, wiring auxiliary packages to their actual Maven parents rather than flat to the root archivejava.use-embedded-pom-dependencies(default: false) — no behavior change unless opted inDesign decisions
maven.IDas map keyFindNodeByGAfallback to handle version-mismatch scenarios where dependency management resolves a different version than what the POM declaresID.Coordinate(): explicit, round-trippable serialization (groupId:artifactId:version) used forIntendedParentIDin JSONfull coord → groupId:artifactId → artifactIdfallback for cross-archive parent resolutionType of change
Checklist
Issue references
This PR splits #4843 to focus on embedded POM graph only and incorporates all architectural feedback from @kzantow's review:
pkg/cataloger/javaUseEmbeddedPOMDependencies, moved from shared relationship options toArchiveCatalogerConfigmaven.IDas map key with explicit serialization andmaven_id.gowrapper removedFindNodeByGA(groupID, artifactID string)as a fallback when exactmaven.IDmatch (including version) fails. This handles the scenario where Maven dependency management resolves a different version than what the POM declares and the graph still finds the correct node bygroupId:artifactId.DependencyRelationshipDatais output enrichment for SBOM consumers, not structural redundancy on the graph.archive_parser.gowas replaced with abuildPkgIndex()method. Relationship creation split into clearly namedcreateAuxPkgRelationshipandcreateMainPkgRelationshipmethods.