-
Notifications
You must be signed in to change notification settings - Fork 15
MLE-23405 - Force Spring Framework to v6 in tests. #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,9 +14,10 @@ plugins { | |
| // id "com.github.davidmc24.gradle.plugin.avro" version "1.6.0" | ||
| } | ||
|
|
||
| // With the upgrade to Spring Framework v6, we need to use Java 17 or later. | ||
| java { | ||
| sourceCompatibility = 1.8 | ||
| targetCompatibility = 1.8 | ||
| sourceCompatibility = 17 | ||
| targetCompatibility = 17 | ||
| } | ||
|
|
||
| repositories { | ||
|
|
@@ -32,12 +33,22 @@ configurations { | |
| // Force v4.5.0 of commons-collections4 to avoid CVEs in v4.4.0 from transitive dependecies: | ||
| // CVE-2025-48924 (https://www.cve.org/CVERecord?id=CVE-2025-48924) and | ||
| // CVE-2020-15250 (https://www.cve.org/CVERecord?id=CVE-2020-15250) | ||
| force "org.apache.commons:commons-collections4:4.5.0" | ||
| force 'org.apache.commons:commons-collections4:4.5.0' | ||
|
|
||
| // Force v3.18 of commons-lang3 to avoid CVE-2025-48924 | ||
| // (https://www.cve.org/CVERecord?id=CVE-2025-48924), without also | ||
| // upgrading ml-app-deployer to 6.0.0, which we are not ready to do yet. | ||
| force 'org.apache.commons:commons-lang3:3.18.0' | ||
|
|
||
| // Force Spring Framework v6 to avaoid CVEs in v5.3.9 and earlier. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use a configurations block instead - it avoids the brittleness of trying to list every Spring dependency, and it also allows for explaining what's going on - e.g. |
||
| // These dependencies are used by marklogic-junit5. | ||
| force 'org.springframework:spring-aop:6.2.9' | ||
| force 'org.springframework:spring-beans:6.2.9' | ||
| force 'org.springframework:spring-context:6.2.9' | ||
| force 'org.springframework:spring-core:6.2.9' | ||
| force 'org.springframework:spring-expression:6.2.9' | ||
| force 'org.springframework:spring-test:6.2.9' | ||
| force 'org.springframework:spring-web:6.2.9' | ||
| } | ||
| } | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to stay on Java 8 so that the 1.11.0 release still supports Java 8.
The way to do this is to use a toolchain:
That forces users - i.e. us and Jenkins - to use Java 17 or later to build and run the tests. But this block ensures that the connector still runs on Java 8.