Skip to content

Commit a3168e3

Browse files
committed
Centralize dependency management of Commons Compress
Closes gh-39368
1 parent 90b920a commit a3168e3

File tree

4 files changed

+10
-31
lines changed

4 files changed

+10
-31
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ bom {
3333
]
3434
}
3535
}
36+
library("Commons Compress", "1.21") {
37+
group("org.apache.commons") {
38+
modules = [
39+
"commons-compress"
40+
]
41+
}
42+
}
3643
library("Commons FileUpload", "1.5") {
3744
group("commons-fileupload") {
3845
modules = [

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/build.gradle

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,6 @@ configurations.all {
1919
if (dependency.requested.group.equals("org.springframework")) {
2020
dependency.useVersion("$springFramework60xVersion")
2121
}
22-
// We manage the version of commons-compress here rather than
23-
// in spring-boot-parent to minimize conflicts with Testcontainers
24-
if (dependency.requested.group.equals("org.apache.commons")
25-
&& dependency.requested.name.equals("commons-compress")) {
26-
dependency.useVersion("$commonsCompressVersion")
27-
}
28-
// Downgrade Testcontainers for compatibility with the managed
29-
// version of Commons Compress.
30-
if (dependency.requested.group.equals("org.testcontainers")) {
31-
dependency.useVersion("1.19.3")
32-
}
3322
}
3423
}
3524
}
@@ -38,7 +27,7 @@ dependencies {
3827
api("com.fasterxml.jackson.core:jackson-databind")
3928
api("com.fasterxml.jackson.module:jackson-module-parameter-names")
4029
api("net.java.dev.jna:jna-platform")
41-
api("org.apache.commons:commons-compress:$commonsCompressVersion")
30+
api("org.apache.commons:commons-compress")
4231
api("org.apache.httpcomponents.client5:httpclient5")
4332
api("org.springframework:spring-core")
4433
api("org.tomlj:tomlj:1.0.0")

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,6 @@ configurations {
5959
if (dependency.requested.group.equals("org.springframework")) {
6060
dependency.useVersion("$springFramework60xVersion")
6161
}
62-
// We manage the version of commons-compress here rather than
63-
// in spring-boot-parent to minimize conflicts with Testcontainers
64-
if (dependency.requested.group.equals("org.apache.commons")
65-
&& dependency.requested.name.equals("commons-compress")) {
66-
dependency.useVersion("$commonsCompressVersion")
67-
}
68-
// Downgrade Testcontainers for compatibility with the managed
69-
// version of Commons Compress.
70-
if (dependency.requested.group.equals("org.testcontainers")) {
71-
dependency.useVersion("1.19.3")
72-
}
7362
}
7463
}
7564
}
@@ -93,7 +82,7 @@ dependencies {
9382
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
9483
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
9584
implementation("io.spring.gradle:dependency-management-plugin")
96-
implementation("org.apache.commons:commons-compress:$commonsCompressVersion")
85+
implementation("org.apache.commons:commons-compress")
9786
implementation("org.springframework:spring-core")
9887

9988
optional("org.graalvm.buildtools:native-gradle-plugin")

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,13 @@ configurations {
2828
if (dependency.requested.group.equals("org.springframework")) {
2929
dependency.useVersion("$springFramework60xVersion")
3030
}
31-
// We manage the version of commons-compress here rather than
32-
// in spring-boot-parent to minimize conflicts with Testcontainers
33-
if (dependency.requested.group.equals("org.apache.commons")
34-
&& dependency.requested.name.equals("commons-compress")) {
35-
dependency.useVersion("$commonsCompressVersion")
36-
}
3731
}
3832
}
3933
}
4034
}
4135

4236
dependencies {
43-
api("org.apache.commons:commons-compress:$commonsCompressVersion")
37+
api("org.apache.commons:commons-compress")
4438
api("org.springframework:spring-core")
4539

4640
compileOnly("ch.qos.logback:logback-classic")

0 commit comments

Comments
 (0)