Skip to content

Why we have 2 http client dependency? #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ppshobi opened this issue Jul 13, 2021 · 4 comments
Closed

Why we have 2 http client dependency? #188

ppshobi opened this issue Jul 13, 2021 · 4 comments

Comments

@ppshobi
Copy link
Contributor

ppshobi commented Jul 13, 2021

Hi, I am super new to java, So I am wondering why we have 2 http client dependencies?

compileOnly group: 'org.apache.httpcomponents.client5', name: 'httpclient5', version: '5.1'
compileOnly 'com.squareup.okhttp3:okhttp:4.9.1'

@alallema
Copy link
Contributor

Hi @ppshobi,
It comes from this PR.
I'm not sure of the why, I think the goal was to allow the user to create a custom HTTP client.
Maybe @eskombro could answer better.

@ppshobi
Copy link
Contributor Author

ppshobi commented Jul 13, 2021

I think I got why multiple dependencies are listed, but whenever I try to build the project I am getting errors like following

/Project/meilisearch-java/src/test/java/com/meilisearch/sdk/http/CustomOkHttpClientTest.java:19: error: package okhttp3 does not exist
import okhttp3.*;

or

/Project/meilisearch-java/src/test/java/com/meilisearch/integration/DocumentsTest.java:14: error: package org.jetbrains.annotations does not exist

is there a command where I can Install all the dependencies?

@alallema
Copy link
Contributor

Normally ./gradlew build should install all the dependencies.
But you can try:

./gradlew build --refresh-dependencies

@ppshobi
Copy link
Contributor Author

ppshobi commented Jul 13, 2021

@alallema Thanks closing this issue

@ppshobi ppshobi closed this as completed Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants