[ 
https://issues.apache.org/jira/browse/MDEP-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17894527#comment-17894527
 ] 

Elias Lundell commented on MDEP-962:
------------------------------------

I will be happy to create a PR to add this information. Some decisions must be 
made on how to represent this in the json format.

Here is a suggestion:
{code:java}
{
  "groupId": "org.eclipse.jetty",
  "artifactId": "jetty-server",
  "version": "9.4.55.v20240627",
  "type": "jar",
  "scope": "test",
  "classifier": "",
  "optional": "false",

--- new ---

  "included": true/false,
  "excludedReason": "omitted for duplicate"/"omitted for conflict with 
$(winnerVersion)",
  "versionManagedFrom": getPremanagedVersion(),
  "scopeManagedFrom": getPremanagedScope(),
  "scopeUpdatedFrom": data.getOriginalScope(),
  "scopeNotUpdatedTo": data.getIgnoredScope()
}
{code}
Where included corresponds to the parenthesis of the normal output, and the 
rest of the keys (excludedReason, versionManagedFrom, etc) are only included if 
they have values.

> Verbose information missing
> ---------------------------
>
>                 Key: MDEP-962
>                 URL: https://issues.apache.org/jira/browse/MDEP-962
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>    Affects Versions: 3.7.0
>            Reporter: Frank Reyes
>            Priority: Minor
>
> 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
> {code:log}
> [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
> {code}
>  
> This is the JSON generated by the plugin:
> {code: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] }
> {code}
> JSON file does not contain the information bounded between parenthesis: 
> Ex:  ...... - omitted for duplicate)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to