Skip to content

Commit a1901a9

Browse files
committed
Force upgrade to Spring 6
1 parent 72f037d commit a1901a9

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

build.gradle

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ plugins {
2727
}
2828

2929
java {
30-
sourceCompatibility = 1.8
31-
targetCompatibility = 1.8
30+
sourceCompatibility = JavaVersion.VERSION_17
31+
targetCompatibility = JavaVersion.VERSION_17
3232
}
3333

3434
repositories {
@@ -81,7 +81,18 @@ dependencies {
8181
exclude module: "logback-classic"
8282
}
8383

84-
testImplementation 'com.marklogic:marklogic-junit5:1.5.0'
84+
testImplementation('com.marklogic:marklogic-junit5:1.5.0') {
85+
// Use the Java Client declared above.
86+
exclude module: "marklogic-client-api"
87+
88+
// Use the Spring dependencies from ml-app-deployer 6 to avoid vulnerabilities in Spring 5.
89+
exclude group: "org.springframework"
90+
}
91+
92+
// Add back all required Spring 6 modules for tests, since junit5 and test code need more than just spring-test
93+
testImplementation "org.springframework:spring-test:6.2.11"
94+
testImplementation "org.springframework:spring-context:6.2.11"
95+
testImplementation "org.springframework:spring-beans:6.2.11"
8596

8697
testImplementation "org.apache.kafka:connect-json:${kafkaVersion}"
8798
testImplementation kafkaConnectRuntime

0 commit comments

Comments
 (0)