slachiewicz opened a new pull request, #320:
URL: https://github.com/apache/maven-dependency-analyzer/pull/320
## Summary
Draft proposal for #280: add analysis-level visibility into raw/referenced
used classes and all candidate providing artifacts when multiple jars contain
the same class, while preserving current single-artifact mapping and results.
## Context
- #313 / PR #315 (1.17.3) fixed declared-vs-undeclared misattribution for
duplicate classes ("declared wins"), but analysis still collapses to one
provider and discards alternatives/pre-mapping information.
- #280 asks for raw used types/classes before artifact mapping and/or a way
to surface ambiguity (shaded bundles, overlapping APIs, duplicates).
## Proposal
See
[`docs/PROPOSAL-280-duplicate-class-visibility.md`](docs/PROPOSAL-280-duplicate-class-visibility.md).
Key points:
- Additive `ProjectDependencyAnalysis` data: raw used class names, candidate
artifacts per used class, ambiguity helpers (and optionally selected-artifact
map), defaulting empty for back-compat.
- `DefaultProjectDependencyAnalyzer` computes full candidate view alongside
existing winner-based mapping; no change to current
`usedDeclared/usedUndeclared/unusedDeclared` outcomes.
- Enables `maven-dependency-plugin` to report all candidates / mark winners
/ flag ambiguity in follow-up work.
## Open for discussion
- API naming/shape and `equals/hashCode/toString` impact.
- Candidate ordering (declared-first vs classpath/load order) and scope
considerations.
- Whether to include unmapped classes and/or per-`DependencyUsage` ambiguity.
Refs: #280 (also commented with findings:
https://github.com/apache/maven-dependency-analyzer/issues/280#issuecomment-6773662676)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]