apache / apache/maven-dependency-plugin
[MDEP-762] `mvn compile dependency:tree` and `mvn package dependency:tree` outputs different result
- Dominant language
- Java
- Stars
- 175
- Forks
- 196
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 5
Description
**[sify21](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sify21)** opened **[MDEP-762](https://issues.apache.org/jira/browse/MDEP-762?redirect=false)** and commented
I made a [sample project here](https://github.com/sify21/mvntest).
```java
mvn compile dependency:tree
```
resolves one version of snappy-java
```java
org.xerial.snappy:snappy-java:jar:1.1.4:compile
```
However,
```java
mvn package dependency:tree
```
resolves two version of snappy-java
```java
org.xerial.snappy:snappy-java:jar:1.1.4:compile
org.xerial.snappy:snappy-java:jar:1.1.7.2:compile
```
---
**Affects:** 3.0.2
**Attachments:**
- [output1](https://issues.apache.org/jira/secure/attachment/13033408/output1) (_141.55 kB_)
- [output2](https://issues.apache.org/jira/secure/attachment/13033409/output2) (_151.44 kB_)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked sample project and run `mvn compile dependency:tree` and `mvn package dependency:tree` against Maven Dependency Plugin 3.0.2. Compare the results with attachments output1 and output2, then establish why the dependency tree differs and verify that the two commands produce consistent resolution.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100