[ 
https://issues.apache.org/jira/browse/MDEP-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Slawomir Jaranowski updated MDEP-737:
-------------------------------------
    Component/s: list

> dependency:list sets compile scope deps as test scope
> -----------------------------------------------------
>
>                 Key: MDEP-737
>                 URL: https://issues.apache.org/jira/browse/MDEP-737
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: list
>            Reporter: Stephanie Wang
>            Priority: Major
>
> Observing this in some googleapis client libraries (relates to: 
> [https://github.com/googleapis/java-scheduler/pull/366)]
> In [https://github.com/googleapis/java-scheduler] repo,
> `mvn dependency:tree -Dverbose -Dincludes=commons-codec` outputs:
> [INFO] com.google.cloud:google-cloud-scheduler:jar:1.23.8-SNAPSHOT
> [INFO] +- com.google.api:gax:jar:1.62.0:compile
> [INFO] | \- com.google.auth:google-auth-library-oauth2-http:jar:0.24.0:compile
> [INFO] | \- com.google.http-client:google-http-client:jar:1.39.0:compile 
> (version managed from 1.38.1)
> [INFO] | \- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
> {color:#00875a}*[INFO] | \- commons-codec:commons-codec:jar:1.15:compile 
> (version managed from 1.11)*{color}
> [INFO] \- com.google.cloud:google-cloud-pubsub:jar:1.111.4:test
> [INFO] \- (commons-codec:commons-codec:jar:1.15:compile - version managed 
> from 1.11; scope updated from test; omitted for duplicate)
>  
> `mvn dependency:list -f pom.xml` outputs:
> [INFO] commons-codec:commons-codec:jar:1.15:{color:#FF0000}*test*{color}
> However, we are expecting:
> [INFO] commons-codec:commons-codec:jar:1.15:{color:#172b4d}*compile*{color}
> Since this commons-code is both a compile-scope transitive dependency and a 
> test-scope transitive dependency. Why is it automatically resolved to 
> test-scope?



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

Reply via email to