Skip to content

Commit

Permalink
update ApacheHttpClient
Browse files Browse the repository at this point in the history
add SolutionInfo to Apache HttpClient
  • Loading branch information
jenschude committed Jan 22, 2025
1 parent 15743c2 commit f7e829a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commercetools/commercetools-apachehttp-client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

dependencies {
api project(":rmf:rmf-java-base")
api "org.apache.httpcomponents.client5:httpclient5:5.3.1" version {
strictly "[5.0,6.0["
prefer "5.1.3"
api "org.apache.httpcomponents.client5:httpclient5:5.4.1" version {
strictly "[5.3.1,6.0["
prefer "5.4.1"
}

api commons.io version commons.io_version
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

package com.commercetools.http.apachehttp;

import io.vrap.rmf.base.client.SolutionInfo;

import org.apache.hc.client5.http.classic.HttpClient;
import org.apache.hc.core5.util.VersionInfo;

public class ApacheHttpClientSolutionInfo extends SolutionInfo {
public ApacheHttpClientSolutionInfo() {
setName("ApacheHttpAsyncClient");
setVersion(
VersionInfo.loadVersionInfo("org.apache.hc.client5", HttpClient.class.getClassLoader()).getRelease());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.commercetools.http.apachehttp.ApacheHttpClientSolutionInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

package com.commercetools.http.apachehttp;

import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;

public class SolutionInfoTest {
@Test
public void version() {
String version = new ApacheHttpClientSolutionInfo().getVersion();

Assertions.assertThat(version).isEqualTo("5.4.1");
}
}

0 comments on commit f7e829a

Please sign in to comment.