Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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
[INFO] | - commons-codec:commons-codec:jar:1.15:compile (version managed from 1.11)
[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:test
However, we are expecting:
[INFO] commons-codec:commons-codec:jar:1.15:compile
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?