From b0157dd6d3c62c41448be5222bebdb585c6b8e64 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 5 Mar 2024 20:15:08 -0800 Subject: [PATCH 1/2] Add the jackson bom to manage jackson dependencies throughout subprojects. --- build.gradle | 14 +++++++++----- gradle.properties | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 6dc76ae86..6acae354a 100644 --- a/build.gradle +++ b/build.gradle @@ -29,10 +29,10 @@ ext { 'spring-aspects' : "org.springframework:spring-aspects:$springFrameworkVersion", 'spring-data-commons' : "org.springframework.data:spring-data-commons:$springDataVersion", 'spring-data-jpa' : "org.springframework.data:spring-data-jpa:$springDataVersion", - 'jackson-annotations' : "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion", - 'jackson-databind' : "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion", - 'jackson-datatype-hibernate5' : "com.fasterxml.jackson.datatype:jackson-datatype-hibernate5:$jacksonVersion", - 'jackson-datatype-jsr310' : "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion", + 'jackson-annotations' : "com.fasterxml.jackson.core:jackson-annotations", + 'jackson-databind' : "com.fasterxml.jackson.core:jackson-databind", + 'jackson-datatype-hibernate5' : "com.fasterxml.jackson.datatype:jackson-datatype-hibernate5", + 'jackson-datatype-jsr310' : "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", 'spring-boot-starter-test' : 'org.springframework.boot:spring-boot-starter-test:2.2.4.RELEASE' ] } @@ -146,6 +146,10 @@ subprojects { exclude group: "org.slf4j", module: "slf4j-log4j12" exclude group: "log4j", module: "log4j" } + + dependencies { + implementation enforcedPlatform("com.fasterxml.jackson:jackson-bom:${jacksonVersion}") + } } signing { @@ -157,4 +161,4 @@ subprojects { sign publishing.publications.mavenJava } } -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 336ca74f4..9a0df13c1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,5 +5,5 @@ springBootVersion=2.7.17 springFrameworkVersion=5.3.30 springSecurityVersion=5.7.10 springDataVersion=2.7.14 -jacksonVersion=2.13.3 +jacksonVersion=2.16.1 elasticVersion=7.8.1 \ No newline at end of file From eda4fff5429a006f940091bc97ca1b471418ec18 Mon Sep 17 00:00:00 2001 From: Jason Han Date: Tue, 5 Mar 2024 20:50:19 -0800 Subject: [PATCH 2/2] Change duplicateStrategy to WARN instead of include. --- example/example.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/example.gradle b/example/example.gradle index bc279fa9e..5eca0e129 100644 --- a/example/example.gradle +++ b/example/example.gradle @@ -46,6 +46,6 @@ configurations { } } bootJar { - duplicatesStrategy = DuplicatesStrategy.INCLUDE + duplicatesStrategy = DuplicatesStrategy.WARN } ext['elasticsearch.version'] = "$elasticVersion"