Make JAR dep paths modifiable#6331
Merged
lrknox merged 5 commits intoHDFGroup:developfrom Apr 13, 2026
Merged
Conversation
hyoklee
previously approved these changes
Mar 30, 2026
There was a problem hiding this comment.
Pull request overview
This PR makes Java dependency JAR locations configurable via CMake cache variables so consumers can override bundled JAR paths with -D...=... at configure time.
Changes:
- Convert SLF4J dependency JAR path variables to
CACHE FILEPATHentries (HDF5_JAVA_LOGGING_JAR,HDF5_JAVA_LOGGING_NOP_JAR,HDF5_JAVA_LOGGING_SIMPLE_JAR). - Introduce cache variables for JUnit and Hamcrest JAR paths (
HDF5_JAVA_JUNIT_JAR,HDF5_JAVA_HAMCREST_JAR) and use them in Java test classpaths. - Update Java test CMake logic to consume the new cache variables instead of hard-coded
${HDF5_JAVA_LIB_DIR}/...paths.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| CMakeLists.txt | Defines JAR paths as cache variables to allow -D overrides, adds JUnit/Hamcrest cache vars. |
| java/test/CMakeLists.txt | Uses new JUnit/Hamcrest cache vars in CMAKE_JAVA_INCLUDE_PATH. |
| java/src-jni/test/CMakeLists.txt | Uses new JUnit/Hamcrest cache vars in CMAKE_JAVA_INCLUDE_PATH. |
| java/jtest/CMakeLists.txt | Uses new JUnit/Hamcrest cache vars in CMAKE_JAVA_INCLUDE_PATH (both FFM and non-FFM classpaths). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hyoklee
previously approved these changes
Mar 30, 2026
Collaborator
|
Two other comments:
|
Contributor
Author
|
The most recent changes propagate the user-specified path changes down to |
glennsong09
previously approved these changes
Mar 31, 2026
hyoklee
previously approved these changes
Apr 1, 2026
jhendersonHDF
previously approved these changes
Apr 1, 2026
Collaborator
|
Just needs conflict resolving |
hyoklee
previously approved these changes
Apr 3, 2026
glennsong09
previously approved these changes
Apr 3, 2026
dbaf82c to
2484d29
Compare
jhendersonHDF
approved these changes
Apr 13, 2026
lrknox
approved these changes
Apr 13, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The build system for the java libraries currently forces dependency JARs (e.g. SLF4j) to always be pulled from their bundled location in
java/lib.This PR changes several JAR path variables to CACHE variables, so that users interested in providing their own path to different JARs can do so via
-Doverrides. Specifically, the altered variables areThis PR also moves the JUnit and Hamcrest JAR paths to similarly modifiable cache variables (
HDF5_JAVA_JUNIT_JARandHDF5_JAVA_HAMCREST_JAR) instead of building them inline in a couple different places.