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
pull/32551/head
Brian Clozel 2 years ago
parent 3702c71fc1
commit 5fb2a50ad0

@ -31,9 +31,7 @@ dependencies {
intTestImplementation(project(":spring-boot-project:spring-boot-autoconfigure")) intTestImplementation(project(":spring-boot-project:spring-boot-autoconfigure"))
intTestImplementation(project(":spring-boot-project:spring-boot-test")) intTestImplementation(project(":spring-boot-project:spring-boot-test"))
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
intTestImplementation("org.apache.httpcomponents:httpclient") { intTestImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
intTestImplementation("org.assertj:assertj-core") intTestImplementation("org.assertj:assertj-core")
intTestImplementation("org.awaitility:awaitility") intTestImplementation("org.awaitility:awaitility")
intTestImplementation("org.junit.jupiter:junit-jupiter") intTestImplementation("org.junit.jupiter:junit-jupiter")

@ -86,6 +86,7 @@ dependencies {
exclude group: "commons-logging", module: "commons-logging" exclude group: "commons-logging", module: "commons-logging"
exclude group: "xml-apis", module: "xml-apis" exclude group: "xml-apis", module: "xml-apis"
} }
implementation("org.apache.httpcomponents.client5:httpclient5")
implementation("org.apache.commons:commons-dbcp2") { implementation("org.apache.commons:commons-dbcp2") {
exclude group: "commons-logging", module: "commons-logging" exclude group: "commons-logging", module: "commons-logging"
} }

@ -18,9 +18,7 @@ dependencies {
optional("jakarta.json.bind:jakarta.json.bind-api") optional("jakarta.json.bind:jakarta.json.bind-api")
optional("jakarta.servlet:jakarta.servlet-api") optional("jakarta.servlet:jakarta.servlet-api")
optional("junit:junit") optional("junit:junit")
optional("org.apache.httpcomponents:httpclient") { optional("org.apache.httpcomponents.client5:httpclient5")
exclude(group: "commons-logging", module: "commons-logging")
}
optional("org.assertj:assertj-core") optional("org.assertj:assertj-core")
optional("org.hamcrest:hamcrest-core") optional("org.hamcrest:hamcrest-core")
optional("org.hamcrest:hamcrest-library") optional("org.hamcrest:hamcrest-library")

@ -47,9 +47,6 @@ dependencies {
optional("org.apache.commons:commons-dbcp2") { optional("org.apache.commons:commons-dbcp2") {
exclude(group: "commons-logging", module: "commons-logging") 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.httpcomponents.client5:httpclient5")
optional("org.apache.logging.log4j:log4j-api") optional("org.apache.logging.log4j:log4j-api")
optional("org.apache.logging.log4j:log4j-core") optional("org.apache.logging.log4j:log4j-core")

@ -25,9 +25,7 @@ dependencies {
systemTestImplementation(enforcedPlatform(project(path: ":spring-boot-project:spring-boot-parent"))) 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-starters:spring-boot-starter-test"))
systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support")) systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
systemTestImplementation("org.apache.httpcomponents:httpasyncclient") { systemTestImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
systemTestImplementation("org.awaitility:awaitility") systemTestImplementation("org.awaitility:awaitility")
systemTestImplementation("org.testcontainers:junit-jupiter") systemTestImplementation("org.testcontainers:junit-jupiter")
systemTestImplementation("org.testcontainers:testcontainers") systemTestImplementation("org.testcontainers:testcontainers")

@ -13,9 +13,7 @@ configurations {
dependencies { dependencies {
intTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) 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(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
intTestImplementation("org.apache.httpcomponents:httpasyncclient") { intTestImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
intTestImplementation("org.awaitility:awaitility") intTestImplementation("org.awaitility:awaitility")
intTestImplementation("org.springframework:spring-web") intTestImplementation("org.springframework:spring-web")

@ -13,7 +13,5 @@ dependencies {
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testRuntimeOnly("org.apache.httpcomponents:httpclient") { testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -15,7 +15,5 @@ dependencies {
runtimeOnly("com.h2database:h2") runtimeOnly("com.h2database:h2")
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testRuntimeOnly("org.apache.httpcomponents:httpclient") { testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -13,7 +13,5 @@ dependencies {
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testRuntimeOnly("org.apache.httpcomponents:httpclient") { testRuntimeOnly("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -10,7 +10,5 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) 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(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents:httpclient") { testImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -11,7 +11,5 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-webflux")) 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(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents:httpclient") { testImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -11,4 +11,5 @@ dependencies {
implementation("org.springframework.security:spring-security-saml2-service-provider") implementation("org.springframework.security:spring-security-saml2-service-provider")
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents.client5:httpclient5")
} }

@ -9,7 +9,5 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) 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(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents:httpclient") { testImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -9,7 +9,5 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) 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(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents:httpclient") { testImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -19,7 +19,5 @@ dependencies {
providedRuntime("org.apache.tomcat.embed:tomcat-embed-jasper") providedRuntime("org.apache.tomcat.embed:tomcat-embed-jasper")
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents:httpclient") { testImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -12,7 +12,5 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-undertow")) 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(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents:httpclient") { testImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -10,7 +10,5 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) 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(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents:httpclient") { testImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -13,7 +13,5 @@ dependencies {
runtimeOnly("com.h2database:h2") runtimeOnly("com.h2database:h2")
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test")) testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents:httpclient") { testImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

@ -10,7 +10,5 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) 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(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.apache.httpcomponents:httpclient") { testImplementation("org.apache.httpcomponents.client5:httpclient5")
exclude group: "commons-logging", module: "commons-logging"
}
} }

Loading…
Cancel
Save