apache / apache/maven-dependency-tree
ConflictData.originalScope and originaOptionality are never populated
- Dominant language
- Java
- Stars
- 27
- Forks
- 31
- Avg merge
- 5h 53m
- Merged PRs (30d)
- 1
Description
## Summary
`ConflictData` has `originalScope` and `originaOptionality` fields with setters, but nothing in the code base ever sets them. The verbose dependency tree therefore never shows the “scope updated from …” annotation that `VerboseDependencyNode` is wired to print.
## Affected code
- `src/main/java/org/apache/maven/shared/dependency/graph/internal/ConflictData.java:29-34, 44-58` — fields only `winnerVersion`/`ignoredScope` are set via the constructor
- `src/main/java/org/apache/maven/shared/dependency/graph/internal/VerboseDependencyNode.java:69-71` — `toNodeString()` prints “scope updated from …” only when `data.getOriginalScope() != null`, which is always null
## Impact
A feature gap / dead code path: the verbose output silently omits “scope updated from”. Either wire up population of `originalScope`/`originaOptionality` (e.g. from the scope-deriver/`REDUCED_SCOPE` data), or remove the dead fields and code.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read ConflictData.java and VerboseDependencyNode.java, then trace the scope-deriver and REDUCED_SCOPE data mentioned in the issue to determine whether the original values are available. Done means resolving the dead path consistently: populate the fields so verbose output can report the original scope, or remove the unused fields and annotation logic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100