These are chat archives for spring-cloud/spring-cloud

5th
Feb 2019
Corneil du Plessis
@corneil
Feb 05 11:49
@dnijssen mvn dependency:tree
dnijssen
@dnijssen
Feb 05 17:20
[INFO] +- com.squareup.okhttp3:mockwebserver:jar:3.12.1:test
[INFO] |  \- com.squareup.okhttp3:okhttp:jar:3.8.1:test
[INFO] |     \- com.squareup.okio:okio:jar:1.13.0:test
but whenever I remove the org.springframework.cloud:spring-cloud-dependencies dependencyManagement section it returns the following:
[INFO] +- com.squareup.okhttp3:mockwebserver:jar:3.12.1:test
[INFO] |  \- com.squareup.okhttp3:okhttp:jar:3.12.1:test
[INFO] |     \- com.squareup.okio:okio:jar:1.15.0:test
Spencer Gibb
@spencergibb
Feb 05 17:27
Add -X to help diagnose where it came from
dnijssen
@dnijssen
Feb 05 17:30
[DEBUG]    com.squareup.okhttp3:mockwebserver:jar:3.12.1:test
[DEBUG]       com.squareup.okhttp3:okhttp:jar:3.8.1:test (version managed from 3.12.1)
[DEBUG]          com.squareup.okio:okio:jar:1.13.0:test
Spencer Gibb
@spencergibb
Feb 05 17:32
@dnijssen so you put a dependency in dependency management for okhttp above spring-cloud-dependencies and it didn't work?
dnijssen
@dnijssen
Feb 05 17:38

just added the following to my dependencyManagement section above spring-cloud-dependencies:

<dependency>
        <groupId>com.squareup.okhttp3</groupId>
        <artifactId>okhttp</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
      </dependency>

and now it returns:

[DEBUG]    com.squareup.okhttp3:mockwebserver:jar:3.12.1:test
[DEBUG]       com.squareup.okhttp3:okhttp:jar:3.12.1:test (scope managed from compile) (version managed from 3.12.1)
[DEBUG]          com.squareup.okio:okio:jar:1.15.0:test
Spencer Gibb
@spencergibb
Feb 05 17:38
That's what we asked to do previously
dnijssen
@dnijssen
Feb 05 17:38
yea, sorry :) my bad
however why is this needed now when using the spring-cloud-dependencies dependencyManagement ?
Spencer Gibb
@spencergibb
Feb 05 17:39
You are using a newer version than is managed by spring cloud
dnijssen
@dnijssen
Feb 05 17:39
where can i see which versions are managed by spring cloud ?
Spencer Gibb
@spencergibb
Feb 05 17:39
(or spring framework)
It depends
dnijssen
@dnijssen
Feb 05 17:45
oke, just weird when i'll try to find 3.8.1 for the okhttp dependency anwhere in my projects/libraries i cant find it anywhere
all i can find is a 3.6.0 being used somewhere else
dnijssen
@dnijssen
Feb 05 17:48
cool! my IDE hasnt pulled in spring-cloud-netflix apperently
Spencer Gibb
@spencergibb
Feb 05 17:48
doesn't have to, it gets managed in dependency management via spring-cloud-dependencies
dnijssen
@dnijssen
Feb 05 18:00
thank you!