apache / apache/maven-dependency-plugin
[MDEP-741] Omitting incorrect occurrence in tree
- Dominant language
- Java
- Stars
- 175
- Forks
- 196
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 5
Description
**[nabeel saabna](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=nabeels)** opened **[MDEP-741](https://issues.apache.org/jira/browse/MDEP-741?redirect=false)** and commented
**Description:**
Dependency net.bytebuddy:byte-buddy:jar:1.10.18:compile appears only once under a test scope dependency org.mockito:mockito-core:jar:3.6.28:test when running mvn dependency:tree although it is a child of another dependency with scope compile
**Actual behavior:**
The same lines that appears when running dependency:tree command:
```java
+- org.mockito:mockito-core:jar:3.6.28:test
| +- net.bytebuddy:byte-buddy:jar:1.10.18:compile
```
Should be part of the omitted dependencies according to dependency:tree -Dverbose=true
```java
+- org.mockito:mockito-core:jar:3.6.28:test
| +- (net.bytebuddy:byte-buddy:jar:1.10.18:compile - scope updated from test; omitted for duplicate)
```
Full compare report attached
**Expected behavior:**
net.bytebuddy:byte-buddy:jar:1.10.18:compile to appear in the correct place in the tree
**Attachments:**
test-dependency-bug.zip
example project used to reproduce the issue and generate the report
mvn_verbose_compare.html
a compare report showing the issue
expecting line 12 to appear only the right side (verbose mode)
and line 18 to appear on both sides (appears only in verbose mode)
---
**Affects:** 2.8, 2.10, 3.1.2
**Attachments:**
- [mvn_verbose_compare.html](https://issues.apache.org/jira/secure/attachment/13023249/mvn_verbose_compare.html) (_64.59 kB_)
- [test-dependency-bug.zip](https://issues.apache.org/jira/secure/attachment/13023248/test-dependency-bug.zip) (_3.94 kB_)
Contributor guide
No contributing guide indexed for this repository
Research direction
Unpack test-dependency-bug.zip and reproduce the dependency:tree output for the supplied project, comparing normal mode with -Dverbose=true and the attached mvn_verbose_compare.html report. Trace the dependency:tree entry point and the code that formats omitted duplicates; done means the compile-scoped byte-buddy occurrence is shown in the correct omitted-dependency position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100