eclipse-lyo / lyo.client

Lyo project repository (lyo.client)
11 stars 16 forks source link

Force httpclient version #84

Closed jadelkhoury closed 4 years ago

jadelkhoury commented 4 years ago

Fixes #85

jadelkhoury commented 4 years ago

@berezovskyi I'm no maven expert, but is this good enough. But I'm learning :-)

jadelkhoury commented 4 years ago

I have tested this change in 2 ways:

  1. adaptor-rm sample adaptor now works for json-ld
  2. client-oauth-discovery-dui (from https://github.com/OSLC/lyo-samples/tree/master/client-oauth-discovery-dui) also worked very fine. This means using the latter version of httpclient does not affect oauth library negatively.
berezovskyi commented 4 years ago

Though I am not sure how did the problem begin in the first place. I used a dependencyManagement mechanism to force the version: https://stackoverflow.com/a/9119183/464590

Maybe you don't even need to add the client library and just to update the version?

jadelkhoury commented 4 years ago

dependencyManagement already has a dependency on 4.5.6, and that did not help. https://github.com/eclipse/lyo.client/blob/4a7e994b4ede142e203be44ef7aa514b561ed9aa/oslc4j-client/pom.xml#L143

Since I am sure you will have input on the next fix I make, can we make sure I understand what you mean with the exclusion suggestion? that is: from

<dependency>
            <groupId>net.oauth.core</groupId>
            <artifactId>oauth-httpclient4</artifactId>
            <version>20090913</version>
</dependency>

to this?

<dependency>
            <groupId>net.oauth.core</groupId>
            <artifactId>oauth-httpclient4</artifactId>
            <version>20090913</version>
           <exclusions>
             <exclusion>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
              </exclusion>
        </exclusions>
</dependency>
jadelkhoury commented 4 years ago

@berezovskyi please review this last change. thanks.