From 5fb2a50ad0eba83fb8aa1773643512a97e4e3862 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 21 Sep 2022 14:21:53 +0200 Subject: [PATCH] Adapt build dependencies to httpclient5 As htttpclient 4.x is not supported anymore by `RestTemplate`, this commit changes such dependencies to httpclient5 instead. In some cases, the httpclient 4.x was transitively brought by a non-Spring dependency. See gh-32461 --- spring-boot-project/spring-boot-devtools/build.gradle | 4 +--- spring-boot-project/spring-boot-docs/build.gradle | 1 + spring-boot-project/spring-boot-test/build.gradle | 4 +--- spring-boot-project/spring-boot/build.gradle | 3 --- .../spring-boot-deployment-tests/build.gradle | 4 +--- .../spring-boot-server-tests/build.gradle | 4 +--- .../build.gradle | 4 +--- .../spring-boot-smoke-test-actuator/build.gradle | 4 +--- .../spring-boot-smoke-test-jetty-ssl/build.gradle | 4 +--- .../spring-boot-smoke-test-oauth2-client/build.gradle | 4 +--- .../build.gradle | 4 +--- .../build.gradle | 1 + .../build.gradle | 4 +--- .../spring-boot-smoke-test-tomcat-ssl/build.gradle | 4 +--- .../spring-boot-smoke-test-traditional/build.gradle | 4 +--- .../spring-boot-smoke-test-undertow-ssl/build.gradle | 4 +--- .../spring-boot-smoke-test-web-secure-custom/build.gradle | 4 +--- .../spring-boot-smoke-test-web-secure-jdbc/build.gradle | 4 +--- .../spring-boot-smoke-test-web-secure/build.gradle | 4 +--- 19 files changed, 18 insertions(+), 51 deletions(-) diff --git a/spring-boot-project/spring-boot-devtools/build.gradle b/spring-boot-project/spring-boot-devtools/build.gradle index 7df4d29188..47ff99ad63 100644 --- a/spring-boot-project/spring-boot-devtools/build.gradle +++ b/spring-boot-project/spring-boot-devtools/build.gradle @@ -31,9 +31,7 @@ dependencies { intTestImplementation(project(":spring-boot-project:spring-boot-autoconfigure")) intTestImplementation(project(":spring-boot-project:spring-boot-test")) intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) - intTestImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + intTestImplementation("org.apache.httpcomponents.client5:httpclient5") intTestImplementation("org.assertj:assertj-core") intTestImplementation("org.awaitility:awaitility") intTestImplementation("org.junit.jupiter:junit-jupiter") diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index 5e8da4f8eb..6c1c9939fe 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -86,6 +86,7 @@ dependencies { exclude group: "commons-logging", module: "commons-logging" exclude group: "xml-apis", module: "xml-apis" } + implementation("org.apache.httpcomponents.client5:httpclient5") implementation("org.apache.commons:commons-dbcp2") { exclude group: "commons-logging", module: "commons-logging" } diff --git a/spring-boot-project/spring-boot-test/build.gradle b/spring-boot-project/spring-boot-test/build.gradle index c5bf581bb2..530a616460 100644 --- a/spring-boot-project/spring-boot-test/build.gradle +++ b/spring-boot-project/spring-boot-test/build.gradle @@ -18,9 +18,7 @@ dependencies { optional("jakarta.json.bind:jakarta.json.bind-api") optional("jakarta.servlet:jakarta.servlet-api") optional("junit:junit") - optional("org.apache.httpcomponents:httpclient") { - exclude(group: "commons-logging", module: "commons-logging") - } + optional("org.apache.httpcomponents.client5:httpclient5") optional("org.assertj:assertj-core") optional("org.hamcrest:hamcrest-core") optional("org.hamcrest:hamcrest-library") diff --git a/spring-boot-project/spring-boot/build.gradle b/spring-boot-project/spring-boot/build.gradle index 4a12ee8b40..39c5fc8598 100644 --- a/spring-boot-project/spring-boot/build.gradle +++ b/spring-boot-project/spring-boot/build.gradle @@ -47,9 +47,6 @@ dependencies { optional("org.apache.commons:commons-dbcp2") { exclude(group: "commons-logging", module: "commons-logging") } - optional("org.apache.httpcomponents:httpclient") { - exclude(group: "commons-logging", module: "commons-logging") - } optional("org.apache.httpcomponents.client5:httpclient5") optional("org.apache.logging.log4j:log4j-api") optional("org.apache.logging.log4j:log4j-core") diff --git a/spring-boot-system-tests/spring-boot-deployment-tests/build.gradle b/spring-boot-system-tests/spring-boot-deployment-tests/build.gradle index 1038367578..39391bcef9 100644 --- a/spring-boot-system-tests/spring-boot-deployment-tests/build.gradle +++ b/spring-boot-system-tests/spring-boot-deployment-tests/build.gradle @@ -25,9 +25,7 @@ dependencies { systemTestImplementation(enforcedPlatform(project(path: ":spring-boot-project:spring-boot-parent"))) systemTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) - systemTestImplementation("org.apache.httpcomponents:httpasyncclient") { - exclude group: "commons-logging", module: "commons-logging" - } + systemTestImplementation("org.apache.httpcomponents.client5:httpclient5") systemTestImplementation("org.awaitility:awaitility") systemTestImplementation("org.testcontainers:junit-jupiter") systemTestImplementation("org.testcontainers:testcontainers") diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/build.gradle b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/build.gradle index c64175833b..3224269e04 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/build.gradle +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/build.gradle @@ -13,9 +13,7 @@ configurations { dependencies { intTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) - intTestImplementation("org.apache.httpcomponents:httpasyncclient") { - exclude group: "commons-logging", module: "commons-logging" - } + intTestImplementation("org.apache.httpcomponents.client5:httpclient5") intTestImplementation("org.awaitility:awaitility") intTestImplementation("org.springframework:spring-web") diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-custom-security/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-custom-security/build.gradle index e009488c4a..68c6468d8c 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-custom-security/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-custom-security/build.gradle @@ -13,7 +13,5 @@ dependencies { testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testRuntimeOnly("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5") } \ No newline at end of file diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/build.gradle index 1f875cc8de..b616d3a969 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/build.gradle @@ -15,7 +15,5 @@ dependencies { runtimeOnly("com.h2database:h2") testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testRuntimeOnly("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5") } \ No newline at end of file diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-ssl/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-ssl/build.gradle index 5933f83271..72c93ab6c3 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-ssl/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-ssl/build.gradle @@ -13,7 +13,5 @@ dependencies { testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testRuntimeOnly("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-oauth2-client/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-oauth2-client/build.gradle index d45c28a711..41f68183c5 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-oauth2-client/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-oauth2-client/build.gradle @@ -10,7 +10,5 @@ dependencies { implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testImplementation("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-reactive-oauth2-client/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-reactive-oauth2-client/build.gradle index 6c2ed59524..5168ec5d8f 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-reactive-oauth2-client/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-reactive-oauth2-client/build.gradle @@ -11,7 +11,5 @@ dependencies { implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-webflux")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testImplementation("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-saml2-service-provider/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-saml2-service-provider/build.gradle index 2a707f22f5..b332f51c44 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-saml2-service-provider/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-saml2-service-provider/build.gradle @@ -11,4 +11,5 @@ dependencies { implementation("org.springframework.security:spring-security-saml2-service-provider") testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) + testImplementation("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-multi-connectors/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-multi-connectors/build.gradle index 708fc08194..e379e8b9df 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-multi-connectors/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-multi-connectors/build.gradle @@ -9,7 +9,5 @@ dependencies { implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testImplementation("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-ssl/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-ssl/build.gradle index db2ff3598b..6f7cd28955 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-ssl/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-ssl/build.gradle @@ -9,7 +9,5 @@ dependencies { implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testImplementation("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-traditional/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-traditional/build.gradle index 28019a34c8..fe339236a6 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-traditional/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-traditional/build.gradle @@ -19,7 +19,5 @@ dependencies { providedRuntime("org.apache.tomcat.embed:tomcat-embed-jasper") testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testImplementation("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-undertow-ssl/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-undertow-ssl/build.gradle index 371a4757b7..e39ba4569d 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-undertow-ssl/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-undertow-ssl/build.gradle @@ -12,7 +12,5 @@ dependencies { implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-undertow")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testImplementation("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-custom/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-custom/build.gradle index ae502a5927..ff8abb8d7d 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-custom/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-custom/build.gradle @@ -10,7 +10,5 @@ dependencies { implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testImplementation("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-jdbc/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-jdbc/build.gradle index 1da1ca8911..f64ee748e6 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-jdbc/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-jdbc/build.gradle @@ -13,7 +13,5 @@ dependencies { runtimeOnly("com.h2database:h2") testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testImplementation("org.apache.httpcomponents.client5:httpclient5") } diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure/build.gradle b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure/build.gradle index 9cdcc56a8d..69fc1dcab6 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure/build.gradle +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure/build.gradle @@ -10,7 +10,5 @@ dependencies { implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) - testImplementation("org.apache.httpcomponents:httpclient") { - exclude group: "commons-logging", module: "commons-logging" - } + testImplementation("org.apache.httpcomponents.client5:httpclient5") }