Stephanie Wang created MDEP-737: ----------------------------------- Summary: 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 Reporter: Stephanie Wang
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.3.4#803005)