diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c31384..d442d9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v1.2.0] - 2024-06-01 +### Added +- Additional modules that aren't fetched by jdeps can be added with `--add-modules module_1,...,module_n` + ## [v1.1.0] - 2024-05-31 ### Changed - Improved macOS runnable execution in the tar.gz file. The executable file is now placed inside a folder named `application.app`, allowing it to be launched with a double-click. @@ -24,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - See origin repository: https://github.com/guziks/warp4j [unreleased]: https://github.com/kirbylink/warp4j/compare/master...HEAD -[v1.1.0]: https://github.com/kirbylink//warp4j/compare/v1.0.0...v1.1.0 -[v1.0.0]: https://github.com/kirbylink//warp4j/compare/stable...v1.0.0 +[v1.2.0]: https://github.com/kirbylink/warp4j/compare/v1.1.0...v1.2.0 +[v1.1.0]: https://github.com/kirbylink/warp4j/compare/v1.0.0...v1.1.0 +[v1.0.0]: https://github.com/kirbylink/warp4j/compare/stable...v1.0.0 [origin warp4j]: https://github.com/guziks/warp4j \ No newline at end of file diff --git a/README.md b/README.md index 5aa2f3b..c29c280 100644 --- a/README.md +++ b/README.md @@ -78,13 +78,16 @@ Options: (default: ./warped) -p, --prefix If set, warp-packer will use the prefix - as target folder in which the + as target folder in which the application should be extracted --list Show available java releases; Takes into consideration other options: "--java-version", "--no-optimize", "--jvm-impl"; The output may be used to specify concrete "--java-version" + --add-modules A list of additional java modules that should + be added to the optimized JDK. Separate each + module with commas and no spaces --no-optimize Use JRE instead of optimized JDK; By default jdeps and jlink are used to create optimized JDK for the particular jar; diff --git a/warp4j b/warp4j index 936ef3e..5a5bcd8 100755 --- a/warp4j +++ b/warp4j @@ -31,6 +31,9 @@ function print_help { echo ' "--java-version", "--no-optimize", "--jvm-impl";' echo ' The output may be used to specify concrete' echo ' "--java-version"' + echo ' --add-modules A list of additional java modules that should' + echo ' be added to the optimized JDK. Separate each' + echo ' module with commas and no spaces' echo ' --no-optimize Use JRE instead of optimized JDK;' echo ' By default jdeps and jlink are used to create' echo ' optimized JDK for the particular jar;' @@ -159,6 +162,10 @@ while [[ $# -gt 0 ]]; do LIST_RELEASES=true shift ;; + --add-modules) + ADD_MODULES="$2" + shift 2 + ;; --no-optimize) NO_OPTIMIZE=true shift @@ -695,6 +702,10 @@ if [[ $JAVA_DISTRO_TYPE == $DISTRO_TYPE_JDK ]]; then echo "Fetch modules with default behavior" MODULES=$("$JDEPS" --print-module-deps --ignore-missing-deps --multi-release $JAVA_VERSION_BASE "$JAR" | grep -v Warning) fi + if [ -n "$ADD_MODULES" ]; then + echo "Adding additional modules to optimized JDK: $ADD_MODULES" + MODULES=$ADD_MODULES,$MODULES + fi fi # creates minimized runtime for the platform