mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Minimize scope of version management for commons-compress
See gh-39368
This commit is contained in:
parent
84e390af70
commit
5ae533a00d
@ -6,6 +6,7 @@ org.gradle.jvmargs=-Xmx2g -Dfile.encoding=UTF-8
|
|||||||
|
|
||||||
assertjVersion=3.24.2
|
assertjVersion=3.24.2
|
||||||
commonsCodecVersion=1.16.0
|
commonsCodecVersion=1.16.0
|
||||||
|
commonsCompressVersion=1.21
|
||||||
hamcrestVersion=2.2
|
hamcrestVersion=2.2
|
||||||
jacksonVersion=2.15.3
|
jacksonVersion=2.15.3
|
||||||
junitJupiterVersion=5.10.1
|
junitJupiterVersion=5.10.1
|
||||||
|
@ -34,13 +34,6 @@ bom {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
library("Commons Compress", "1.21") {
|
|
||||||
group("org.apache.commons") {
|
|
||||||
modules = [
|
|
||||||
"commons-compress"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
library("Commons FileUpload", "1.5") {
|
library("Commons FileUpload", "1.5") {
|
||||||
group("commons-fileupload") {
|
group("commons-fileupload") {
|
||||||
modules = [
|
modules = [
|
||||||
|
@ -19,6 +19,17 @@ configurations.all {
|
|||||||
if (dependency.requested.group.equals("org.springframework")) {
|
if (dependency.requested.group.equals("org.springframework")) {
|
||||||
dependency.useVersion("6.0.10")
|
dependency.useVersion("6.0.10")
|
||||||
}
|
}
|
||||||
|
// We manage the version of commons-compress here rather than
|
||||||
|
// in spring-boot-parent to minimize conflicts with Testcontainers
|
||||||
|
if (dependency.requested.group.equals("org.apache.commons")
|
||||||
|
&& dependency.requested.name.equals("commons-compress")) {
|
||||||
|
dependency.useVersion("$commonsCompressVersion")
|
||||||
|
}
|
||||||
|
// Downgrade Testcontainers for compatibility with the managed
|
||||||
|
// version of Commons Compress.
|
||||||
|
if (dependency.requested.group.equals("org.testcontainers")) {
|
||||||
|
dependency.useVersion("1.19.3")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -27,7 +38,7 @@ dependencies {
|
|||||||
api("com.fasterxml.jackson.core:jackson-databind")
|
api("com.fasterxml.jackson.core:jackson-databind")
|
||||||
api("com.fasterxml.jackson.module:jackson-module-parameter-names")
|
api("com.fasterxml.jackson.module:jackson-module-parameter-names")
|
||||||
api("net.java.dev.jna:jna-platform")
|
api("net.java.dev.jna:jna-platform")
|
||||||
api("org.apache.commons:commons-compress")
|
api("org.apache.commons:commons-compress:$commonsCompressVersion")
|
||||||
api("org.apache.httpcomponents.client5:httpclient5")
|
api("org.apache.httpcomponents.client5:httpclient5")
|
||||||
api("org.springframework:spring-core")
|
api("org.springframework:spring-core")
|
||||||
api("org.tomlj:tomlj:1.0.0")
|
api("org.tomlj:tomlj:1.0.0")
|
||||||
|
@ -28,6 +28,17 @@ configurations {
|
|||||||
if (dependency.requested.group.equals("org.springframework")) {
|
if (dependency.requested.group.equals("org.springframework")) {
|
||||||
dependency.useVersion("6.0.10")
|
dependency.useVersion("6.0.10")
|
||||||
}
|
}
|
||||||
|
// We manage the version of commons-compress here rather than
|
||||||
|
// in spring-boot-parent to minimize conflicts with Testcontainers
|
||||||
|
if (dependency.requested.group.equals("org.apache.commons")
|
||||||
|
&& dependency.requested.name.equals("commons-compress")) {
|
||||||
|
dependency.useVersion("$commonsCompressVersion")
|
||||||
|
}
|
||||||
|
// Downgrade Testcontainers for compatibility with the managed
|
||||||
|
// version of Commons Compress.
|
||||||
|
if (dependency.requested.group.equals("org.testcontainers")) {
|
||||||
|
dependency.useVersion("1.19.3")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -39,7 +50,7 @@ dependencies {
|
|||||||
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
|
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
|
||||||
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
|
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
|
||||||
implementation("io.spring.gradle:dependency-management-plugin")
|
implementation("io.spring.gradle:dependency-management-plugin")
|
||||||
implementation("org.apache.commons:commons-compress")
|
implementation("org.apache.commons:commons-compress:$commonsCompressVersion")
|
||||||
implementation("org.springframework:spring-core")
|
implementation("org.springframework:spring-core")
|
||||||
|
|
||||||
optional("org.graalvm.buildtools:native-gradle-plugin")
|
optional("org.graalvm.buildtools:native-gradle-plugin")
|
||||||
|
@ -17,7 +17,7 @@ dependencies {
|
|||||||
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion")
|
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-compiler-runner:$kotlinVersion")
|
implementation("org.jetbrains.kotlin:kotlin-compiler-runner:$kotlinVersion")
|
||||||
implementation("org.jetbrains.kotlin:kotlin-daemon-client:$kotlinVersion")
|
implementation("org.jetbrains.kotlin:kotlin-daemon-client:$kotlinVersion")
|
||||||
implementation("org.apache.commons:commons-compress")
|
implementation("org.apache.commons:commons-compress:$commonsCompressVersion")
|
||||||
|
|
||||||
implementation("org.assertj:assertj-core")
|
implementation("org.assertj:assertj-core")
|
||||||
}
|
}
|
||||||
|
@ -29,13 +29,19 @@ configurations {
|
|||||||
if (dependency.requested.group.equals("org.springframework")) {
|
if (dependency.requested.group.equals("org.springframework")) {
|
||||||
dependency.useVersion("6.0.10")
|
dependency.useVersion("6.0.10")
|
||||||
}
|
}
|
||||||
|
// We manage the version of commons-compress here rather than
|
||||||
|
// in spring-boot-parent to minimize conflicts with Testcontainers
|
||||||
|
if (dependency.requested.group.equals("org.apache.commons")
|
||||||
|
&& dependency.requested.name.equals("commons-compress")) {
|
||||||
|
dependency.useVersion("$commonsCompressVersion")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("org.apache.commons:commons-compress")
|
api("org.apache.commons:commons-compress:$commonsCompressVersion")
|
||||||
api("org.springframework:spring-core")
|
api("org.springframework:spring-core")
|
||||||
|
|
||||||
compileOnly("ch.qos.logback:logback-classic")
|
compileOnly("ch.qos.logback:logback-classic")
|
||||||
|
@ -80,12 +80,12 @@ public class ImageAssert extends AbstractAssert<ImageAssert, ImageReference> {
|
|||||||
this.actual.writeTo(out);
|
this.actual.writeTo(out);
|
||||||
try (TarArchiveInputStream in = new TarArchiveInputStream(
|
try (TarArchiveInputStream in = new TarArchiveInputStream(
|
||||||
new ByteArrayInputStream(out.toByteArray()))) {
|
new ByteArrayInputStream(out.toByteArray()))) {
|
||||||
TarArchiveEntry entry = in.getNextTarEntry();
|
TarArchiveEntry entry = in.getNextEntry();
|
||||||
while (entry != null) {
|
while (entry != null) {
|
||||||
if (!entry.isDirectory()) {
|
if (!entry.isDirectory()) {
|
||||||
entryNames.add(entry.getName().replaceFirst("^/workspace/", ""));
|
entryNames.add(entry.getName().replaceFirst("^/workspace/", ""));
|
||||||
}
|
}
|
||||||
entry = in.getNextTarEntry();
|
entry = in.getNextEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ public class ImageAssert extends AbstractAssert<ImageAssert, ImageReference> {
|
|||||||
this.actual.writeTo(out);
|
this.actual.writeTo(out);
|
||||||
try (TarArchiveInputStream in = new TarArchiveInputStream(
|
try (TarArchiveInputStream in = new TarArchiveInputStream(
|
||||||
new ByteArrayInputStream(out.toByteArray()))) {
|
new ByteArrayInputStream(out.toByteArray()))) {
|
||||||
TarArchiveEntry entry = in.getNextTarEntry();
|
TarArchiveEntry entry = in.getNextEntry();
|
||||||
while (entry != null) {
|
while (entry != null) {
|
||||||
if (entry.getName().equals(name)) {
|
if (entry.getName().equals(name)) {
|
||||||
ByteArrayOutputStream entryOut = new ByteArrayOutputStream();
|
ByteArrayOutputStream entryOut = new ByteArrayOutputStream();
|
||||||
@ -109,7 +109,7 @@ public class ImageAssert extends AbstractAssert<ImageAssert, ImageReference> {
|
|||||||
assertConsumer.accept(new JsonContentAssert(LayerContentAssert.class, entryOut.toString()));
|
assertConsumer.accept(new JsonContentAssert(LayerContentAssert.class, entryOut.toString()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entry = in.getNextTarEntry();
|
entry = in.getNextEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
failWithMessage("Expected JSON entry '%s' in layer with digest '%s'", name, this.actual.getId());
|
failWithMessage("Expected JSON entry '%s' in layer with digest '%s'", name, this.actual.getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user