From 6d6291a10a2689c92ce23fb0c3681e49a86dd71e Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sat, 8 Nov 2025 15:14:41 +0000 Subject: [PATCH] Migrate to ApacheHttpClient 5.x Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.apache.httpclient5.UpgradeApacheHttpClient_5?organizationId=YTA5ODhiOTYtNDI5OS00OGY3LTg0NjctNGZiNmI4OTY1ZjY3 Co-authored-by: Moderne --- pom.xml | 5 +++++ .../apache/maven/buildcache/RemoteCacheRepositoryImpl.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 5c2d61cd..5f2ea8e5 100644 --- a/pom.xml +++ b/pom.xml @@ -134,6 +134,11 @@ under the License. commons-lang3 ${commonsLangVersion} + + org.apache.httpcomponents.client5 + httpclient5 + 5.4.4 + commons-io commons-io diff --git a/src/main/java/org/apache/maven/buildcache/RemoteCacheRepositoryImpl.java b/src/main/java/org/apache/maven/buildcache/RemoteCacheRepositoryImpl.java index 8d884cd7..f91baacf 100644 --- a/src/main/java/org/apache/maven/buildcache/RemoteCacheRepositoryImpl.java +++ b/src/main/java/org/apache/maven/buildcache/RemoteCacheRepositoryImpl.java @@ -33,8 +33,8 @@ import java.util.Optional; import java.util.concurrent.atomic.AtomicReference; -import org.apache.http.HttpStatus; -import org.apache.http.client.HttpResponseException; +import org.apache.hc.core5.http.HttpStatus; +import org.apache.hc.client5.http.HttpResponseException; import org.apache.maven.SessionScoped; import org.apache.maven.buildcache.checksum.MavenProjectInput; import org.apache.maven.buildcache.xml.Build;