From a1901a9203daad1d3f467a9807ec6d7a77828ed6 Mon Sep 17 00:00:00 2001 From: Phil Barber Date: Fri, 3 Oct 2025 10:20:59 -0400 Subject: [PATCH] Force upgrade to Spring 6 --- build.gradle | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index be6575b..8e031bf 100644 --- a/build.gradle +++ b/build.gradle @@ -27,8 +27,8 @@ plugins { } java { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } repositories { @@ -81,7 +81,18 @@ dependencies { exclude module: "logback-classic" } - testImplementation 'com.marklogic:marklogic-junit5:1.5.0' + testImplementation('com.marklogic:marklogic-junit5:1.5.0') { + // Use the Java Client declared above. + exclude module: "marklogic-client-api" + + // Use the Spring dependencies from ml-app-deployer 6 to avoid vulnerabilities in Spring 5. + exclude group: "org.springframework" + } + + // Add back all required Spring 6 modules for tests, since junit5 and test code need more than just spring-test + testImplementation "org.springframework:spring-test:6.2.11" + testImplementation "org.springframework:spring-context:6.2.11" + testImplementation "org.springframework:spring-beans:6.2.11" testImplementation "org.apache.kafka:connect-json:${kafkaVersion}" testImplementation kafkaConnectRuntime