This is an automated email from the ASF dual-hosted git repository.
jinwoo pushed a commit to branch support/2.0
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/support/2.0 by this push:
new ada321925c Add explicit jakarta.annotation-api dependency to fix
version conflict (#7972)
ada321925c is described below
commit ada321925c721b3514341c1ffba325ab162d1d0a
Author: Jinwoo Hwang <[email protected]>
AuthorDate: Fri Dec 12 19:18:26 2025 -0500
Add explicit jakarta.annotation-api dependency to fix version conflict
(#7972)
* Add explicit jakarta.annotation-api dependency to fix version conflict
jakarta.resource-api:2.1.0 declares a transitive dependency on
jakarta.annotation-api:2.1.0, but Spring Boot 3.3.4 (used by geode-gfsh)
requires jakarta.annotation-api:2.1.1. This causes Maven enforcer to
fail with a version conflict error.
By explicitly declaring jakarta.annotation-api as an api dependency
in geode-core, the published POM will include it with version 2.1.1
(from DependencyConstraints), which takes precedence over the
transitive 2.1.0 dependency from jakarta.resource-api.
Reported-by: Leon Finker
* Update expected POM to include jakarta.annotation-api dependency
---
geode-core/build.gradle | 4 ++++
geode-core/src/test/resources/expected-pom.xml | 11 +++++++++++
2 files changed, 15 insertions(+)
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 5ffa6f7d12..ee5ac51b11 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -274,6 +274,10 @@ dependencies {
//The resource-API is used by the JCA support.
api('jakarta.resource:jakarta.resource-api')
+ // Explicitly declare jakarta.annotation-api to override the 2.1.0 version
+ // transitively brought by jakarta.resource-api:2.1.0, ensuring consistency
+ // with Spring Boot 3.3.4 which requires 2.1.1
+ api('jakarta.annotation:jakarta.annotation-api')
api('jakarta.transaction:jakarta.transaction-api')
diff --git a/geode-core/src/test/resources/expected-pom.xml
b/geode-core/src/test/resources/expected-pom.xml
index 4b0caecf26..dac4131b0a 100644
--- a/geode-core/src/test/resources/expected-pom.xml
+++ b/geode-core/src/test/resources/expected-pom.xml
@@ -79,6 +79,17 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>jakarta.annotation</groupId>
+ <artifactId>jakarta.annotation-api</artifactId>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>log4j-to-slf4j</artifactId>
+ <groupId>org.apache.logging.log4j</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>