Skip to content

Commit 5fb2a50

Browse files
committed
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
1 parent 3702c71 commit 5fb2a50

File tree

19 files changed

+18
-51
lines changed

19 files changed

+18
-51
lines changed

spring-boot-project/spring-boot-devtools/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ dependencies {
3131
intTestImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
3232
intTestImplementation(project(":spring-boot-project:spring-boot-test"))
3333
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
34-
intTestImplementation("org.apache.httpcomponents:httpclient") {
35-
exclude group: "commons-logging", module: "commons-logging"
36-
}
34+
intTestImplementation("org.apache.httpcomponents.client5:httpclient5")
3735
intTestImplementation("org.assertj:assertj-core")
3836
intTestImplementation("org.awaitility:awaitility")
3937
intTestImplementation("org.junit.jupiter:junit-jupiter")

spring-boot-project/spring-boot-docs/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ dependencies {
8686
exclude group: "commons-logging", module: "commons-logging"
8787
exclude group: "xml-apis", module: "xml-apis"
8888
}
89+
implementation("org.apache.httpcomponents.client5:httpclient5")
8990
implementation("org.apache.commons:commons-dbcp2") {
9091
exclude group: "commons-logging", module: "commons-logging"
9192
}

spring-boot-project/spring-boot-test/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ dependencies {
1818
optional("jakarta.json.bind:jakarta.json.bind-api")
1919
optional("jakarta.servlet:jakarta.servlet-api")
2020
optional("junit:junit")
21-
optional("org.apache.httpcomponents:httpclient") {
22-
exclude(group: "commons-logging", module: "commons-logging")
23-
}
21+
optional("org.apache.httpcomponents.client5:httpclient5")
2422
optional("org.assertj:assertj-core")
2523
optional("org.hamcrest:hamcrest-core")
2624
optional("org.hamcrest:hamcrest-library")

spring-boot-project/spring-boot/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ dependencies {
4747
optional("org.apache.commons:commons-dbcp2") {
4848
exclude(group: "commons-logging", module: "commons-logging")
4949
}
50-
optional("org.apache.httpcomponents:httpclient") {
51-
exclude(group: "commons-logging", module: "commons-logging")
52-
}
5350
optional("org.apache.httpcomponents.client5:httpclient5")
5451
optional("org.apache.logging.log4j:log4j-api")
5552
optional("org.apache.logging.log4j:log4j-core")

spring-boot-system-tests/spring-boot-deployment-tests/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ dependencies {
2525
systemTestImplementation(enforcedPlatform(project(path: ":spring-boot-project:spring-boot-parent")))
2626
systemTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
2727
systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
28-
systemTestImplementation("org.apache.httpcomponents:httpasyncclient") {
29-
exclude group: "commons-logging", module: "commons-logging"
30-
}
28+
systemTestImplementation("org.apache.httpcomponents.client5:httpclient5")
3129
systemTestImplementation("org.awaitility:awaitility")
3230
systemTestImplementation("org.testcontainers:junit-jupiter")
3331
systemTestImplementation("org.testcontainers:testcontainers")

spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ configurations {
1313
dependencies {
1414
intTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
1515
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
16-
intTestImplementation("org.apache.httpcomponents:httpasyncclient") {
17-
exclude group: "commons-logging", module: "commons-logging"
18-
}
16+
intTestImplementation("org.apache.httpcomponents.client5:httpclient5")
1917
intTestImplementation("org.awaitility:awaitility")
2018
intTestImplementation("org.springframework:spring-web")
2119

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator-custom-security/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ dependencies {
1313

1414
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
1515

16-
testRuntimeOnly("org.apache.httpcomponents:httpclient") {
17-
exclude group: "commons-logging", module: "commons-logging"
18-
}
16+
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
1917
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-actuator/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@ dependencies {
1515
runtimeOnly("com.h2database:h2")
1616

1717
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
18-
testRuntimeOnly("org.apache.httpcomponents:httpclient") {
19-
exclude group: "commons-logging", module: "commons-logging"
20-
}
18+
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
2119
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jetty-ssl/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ dependencies {
1313

1414
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
1515

16-
testRuntimeOnly("org.apache.httpcomponents:httpclient") {
17-
exclude group: "commons-logging", module: "commons-logging"
18-
}
16+
testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
1917
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-oauth2-client/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@ dependencies {
1010
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
1111

1212
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
13-
testImplementation("org.apache.httpcomponents:httpclient") {
14-
exclude group: "commons-logging", module: "commons-logging"
15-
}
13+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
1614
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-reactive-oauth2-client/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@ dependencies {
1111
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-webflux"))
1212

1313
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
14-
testImplementation("org.apache.httpcomponents:httpclient") {
15-
exclude group: "commons-logging", module: "commons-logging"
16-
}
14+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
1715
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-saml2-service-provider/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ dependencies {
1111
implementation("org.springframework.security:spring-security-saml2-service-provider")
1212

1313
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
14+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
1415
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-multi-connectors/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@ dependencies {
99
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
1010

1111
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
12-
testImplementation("org.apache.httpcomponents:httpclient") {
13-
exclude group: "commons-logging", module: "commons-logging"
14-
}
12+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
1513
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-tomcat-ssl/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,5 @@ dependencies {
99
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
1010

1111
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
12-
testImplementation("org.apache.httpcomponents:httpclient") {
13-
exclude group: "commons-logging", module: "commons-logging"
14-
}
12+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
1513
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-traditional/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,5 @@ dependencies {
1919
providedRuntime("org.apache.tomcat.embed:tomcat-embed-jasper")
2020

2121
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
22-
testImplementation("org.apache.httpcomponents:httpclient") {
23-
exclude group: "commons-logging", module: "commons-logging"
24-
}
22+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
2523
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-undertow-ssl/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@ dependencies {
1212
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-undertow"))
1313

1414
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
15-
testImplementation("org.apache.httpcomponents:httpclient") {
16-
exclude group: "commons-logging", module: "commons-logging"
17-
}
15+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
1816
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-custom/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@ dependencies {
1010
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
1111

1212
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
13-
testImplementation("org.apache.httpcomponents:httpclient") {
14-
exclude group: "commons-logging", module: "commons-logging"
15-
}
13+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
1614
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure-jdbc/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ dependencies {
1313
runtimeOnly("com.h2database:h2")
1414

1515
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
16-
testImplementation("org.apache.httpcomponents:httpclient") {
17-
exclude group: "commons-logging", module: "commons-logging"
18-
}
16+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
1917
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-web-secure/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@ dependencies {
1010
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
1111

1212
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
13-
testImplementation("org.apache.httpcomponents:httpclient") {
14-
exclude group: "commons-logging", module: "commons-logging"
15-
}
13+
testImplementation("org.apache.httpcomponents.client5:httpclient5")
1614
}

0 commit comments

Comments
 (0)