apache / apache/maven-dependency-plugin
[MDEP-962] Verbose information missing
- Dominant language
- Java
- Stars
- 175
- Forks
- 196
- Avg merge
- 19h 30m
- Merged PRs (30d)
- 5
Description
**[Frank Reyes](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER307292)** opened **[MDEP-962](https://issues.apache.org/jira/browse/MDEP-962?redirect=false)** and commented
I noticed that when using -Dverbose=true it did include all packages in the output, but did not contain information on whether it was included or not (marked with parenthesis in the text output) and is missing the information about why it is excluded, other version, conflict etc.
Example: mvn dependency:tree -Dverbose=true
```
[INFO] --- dependency:3.6.1:tree (default-cli) @ attackvector ---
[INFO] org.evil:attackvector:jar:1.2
[INFO] +- junit:junit:jar:4.11:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.postgresql:postgresql:jar:42.6.0:compile
[INFO] | \- (org.checkerframework:checker-qual:jar:3.31.0:runtime - omitted for duplicate)
[INFO] +- org.springframework:spring-jdbc:jar:5.3.27:compile
[INFO] | +- org.springframework:spring-beans:jar:5.3.27:compile
[INFO] | | \- (org.springframework:spring-core:jar:5.3.27:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-core:jar:5.3.27:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.3.27:compile
[INFO] | \- org.springframework:spring-tx:jar:5.3.27:compile
[INFO] | +- (org.springframework:spring-beans:jar:5.3.27:compile - omitted for duplicate)
[INFO] | \- (org.springframework:spring-core:jar:5.3.27:compile - omitted for duplicate)
[INFO] +- org.springframework.data:spring-data-relational:jar:2.4.11:compile
[INFO] | +- (org.springframework.data:spring-data-commons:jar:2.7.11:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-tx:jar:5.3.27:compile - omitted for duplicate)
[INFO] | +- org.springframework:spring-context:jar:5.3.27:compile
[INFO] | | +- org.springframework:spring-aop:jar:5.3.27:compile
[INFO] | | | +- (org.springframework:spring-beans:jar:5.3.27:compile - omitted for duplicate)
[INFO] | | | \- (org.springframework:spring-core:jar:5.3.27:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-beans:jar:5.3.27:compile - omitted for duplicate)
[INFO] | | +- (org.springframework:spring-core:jar:5.3.27:compile - omitted for duplicate)
[INFO] | | \- org.springframework:spring-expression:jar:5.3.27:compile
[INFO] | | \- (org.springframework:spring-core:jar:5.3.27:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:5.3.27:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-core:jar:5.3.27:compile - omitted for duplicate)
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.32:compile
[INFO] +- org.springframework.data:spring-data-commons:jar:2.7.11:compile
[INFO] | +- (org.springframework:spring-core:jar:5.3.27:compile - omitted for duplicate)
[INFO] | +- (org.springframework:spring-beans:jar:5.3.27:compile - omitted for duplicate)
[INFO] | \- (org.slf4j:slf4j-api:jar:1.7.32:compile - omitted for duplicate)
[INFO] \- org.checkerframework:checker-qual:jar:3.31.0:compile
```
This is the JSON generated by the plugin:
```json
--- dependency:3.7.0:tree (default-cli) @ attackvector ---
[INFO] {
[INFO] "groupId": "org.evil",
[INFO] "artifactId": "attackvector",
[INFO] "version": "1.2",
[INFO] "type": "jar",
[INFO] "scope": "",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "junit",
[INFO] "artifactId": "junit",
[INFO] "version": "4.11",
[INFO] "type": "jar",
[INFO] "scope": "test",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.hamcrest",
[INFO] "artifactId": "hamcrest-core",
[INFO] "version": "1.3",
[INFO] "type": "jar",
[INFO] "scope": "test",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] },
[INFO] {
[INFO] "groupId": "org.postgresql",
[INFO] "artifactId": "postgresql",
[INFO] "version": "42.6.0",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.checkerframework",
[INFO] "artifactId": "checker-qual",
[INFO] "version": "3.31.0",
[INFO] "type": "jar",
[INFO] "scope": "runtime",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-jdbc",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-beans",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-core",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-core",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-jcl",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-tx",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-beans",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-core",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] }
[INFO] ]
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework.data",
[INFO] "artifactId": "spring-data-relational",
[INFO] "version": "2.4.11",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.springframework.data",
[INFO] "artifactId": "spring-data-commons",
[INFO] "version": "2.7.11",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-tx",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-context",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-aop",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-beans",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-core",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-beans",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-core",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-expression",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-core",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] }
[INFO] ]
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-beans",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-core",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.slf4j",
[INFO] "artifactId": "slf4j-api",
[INFO] "version": "1.7.32",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework.data",
[INFO] "artifactId": "spring-data-commons",
[INFO] "version": "2.7.11",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false",
[INFO] "children": [
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-core",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.springframework",
[INFO] "artifactId": "spring-beans",
[INFO] "version": "5.3.27",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] },
[INFO] {
[INFO] "groupId": "org.slf4j",
[INFO] "artifactId": "slf4j-api",
[INFO] "version": "1.7.32",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] },
[INFO] {
[INFO] "groupId": "org.checkerframework",
[INFO] "artifactId": "checker-qual",
[INFO] "version": "3.31.0",
[INFO] "type": "jar",
[INFO] "scope": "compile",
[INFO] "classifier": "",
[INFO] "optional": "false"
[INFO] }
[INFO] ]
[INFO] }
```
JSON file does not contain the information bounded between parenthesis:
Ex: ...... - omitted for duplicate)
---
**Affects:** 3.7.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the reported `mvn dependency:tree -Dverbose=true` command and inspect the dependency:tree output path. Compare verbose text output with the JSON example, then verify that included or omitted dependencies show their status and exclusion reason, such as version conflicts or duplicates.
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