From 06f5ab162f6b049f42f15c04d3a9a8810c0c6d63 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 9 Apr 2024 09:07:13 +0100 Subject: [PATCH] Exclude unwanted javax.inject dependency from Data Couchbase See gh-40200 --- .../spring-boot-actuator-autoconfigure/build.gradle | 4 +++- spring-boot-project/spring-boot-actuator/build.gradle | 4 +++- spring-boot-project/spring-boot-autoconfigure/build.gradle | 4 +++- spring-boot-project/spring-boot-docs/build.gradle | 4 +++- .../spring-boot-starter-data-couchbase-reactive/build.gradle | 4 +++- .../spring-boot-starter-data-couchbase/build.gradle | 4 +++- .../spring-boot-test-autoconfigure/build.gradle | 4 +++- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index 50d236750fa..72c461af9b6 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -123,7 +123,9 @@ dependencies { optional("org.springframework.data:spring-data-cassandra") { exclude group: "org.slf4j", module: "jcl-over-slf4j" } - optional("org.springframework.data:spring-data-couchbase") + optional("org.springframework.data:spring-data-couchbase") { + exclude(group: "javax.inject", module: "javax.inject") + } optional("org.springframework.data:spring-data-jpa") optional("org.springframework.data:spring-data-ldap") optional("org.springframework.data:spring-data-mongodb") diff --git a/spring-boot-project/spring-boot-actuator/build.gradle b/spring-boot-project/spring-boot-actuator/build.gradle index c4e39305917..a0356cf4829 100644 --- a/spring-boot-project/spring-boot-actuator/build.gradle +++ b/spring-boot-project/spring-boot-actuator/build.gradle @@ -66,7 +66,9 @@ dependencies { optional("org.springframework.data:spring-data-cassandra") { exclude group: "org.slf4j", module: "jcl-over-slf4j" } - optional("org.springframework.data:spring-data-couchbase") + optional("org.springframework.data:spring-data-couchbase") { + exclude(group: "javax.inject", module: "javax.inject") + } optional("org.springframework.data:spring-data-elasticsearch") { exclude(group: "commons-logging", module: "commons-logging") } diff --git a/spring-boot-project/spring-boot-autoconfigure/build.gradle b/spring-boot-project/spring-boot-autoconfigure/build.gradle index 3ed2730ddfe..8da55716866 100644 --- a/spring-boot-project/spring-boot-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure/build.gradle @@ -155,7 +155,9 @@ dependencies { optional("org.springframework:spring-webflux") optional("org.springframework:spring-webmvc") optional("org.springframework.batch:spring-batch-core") - optional("org.springframework.data:spring-data-couchbase") + optional("org.springframework.data:spring-data-couchbase") { + exclude(group: "javax.inject", module: "javax.inject") + } optional("org.springframework.data:spring-data-envers") { exclude group: "javax.activation", module: "javax.activation-api" exclude group: "javax.persistence", module: "javax.persistence-api" diff --git a/spring-boot-project/spring-boot-docs/build.gradle b/spring-boot-project/spring-boot-docs/build.gradle index f55df27a85a..398002a731f 100644 --- a/spring-boot-project/spring-boot-docs/build.gradle +++ b/spring-boot-project/spring-boot-docs/build.gradle @@ -132,7 +132,9 @@ dependencies { implementation("org.springframework.amqp:spring-rabbit") implementation("org.springframework.batch:spring-batch-core") implementation("org.springframework.data:spring-data-cassandra") - implementation("org.springframework.data:spring-data-couchbase") + implementation("org.springframework.data:spring-data-couchbase") { + exclude group: "javax.inject", module: "javax.inject" + } implementation("org.springframework.data:spring-data-elasticsearch") { exclude group: "commons-logging", module: "commons-logging" } diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-couchbase-reactive/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-couchbase-reactive/build.gradle index 3ae4f9bf008..7a103f93818 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-couchbase-reactive/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-couchbase-reactive/build.gradle @@ -7,5 +7,7 @@ description = "Starter for using Couchbase document-oriented database and Spring dependencies { api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) api("io.projectreactor:reactor-core") - api("org.springframework.data:spring-data-couchbase") + api("org.springframework.data:spring-data-couchbase") { + exclude group: "javax.inject", module: "javax.inject" + } } diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-couchbase/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-couchbase/build.gradle index 17742429df2..cda67ddad02 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-data-couchbase/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-data-couchbase/build.gradle @@ -6,5 +6,7 @@ description = "Starter for using Couchbase document-oriented database and Spring dependencies { api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) - api("org.springframework.data:spring-data-couchbase") + api("org.springframework.data:spring-data-couchbase") { + exclude group: "javax.inject", module: "javax.inject" + } } diff --git a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle index 623831519c1..2a520aa3433 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-test-autoconfigure/build.gradle @@ -38,7 +38,9 @@ dependencies { optional("org.springframework.data:spring-data-cassandra") { exclude group: "org.slf4j", module: "jcl-over-slf4j" } - optional("org.springframework.data:spring-data-couchbase") + optional("org.springframework.data:spring-data-couchbase") { + exclude group: "javax.inject", module: "javax.inject" + } optional("org.springframework.data:spring-data-elasticsearch") optional("org.springframework.data:spring-data-jdbc") optional("org.springframework.data:spring-data-jpa")