From 86657a6d32b6dbdcfd83ec075eabe60bb82113e5 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 11 Aug 2022 21:54:33 +0200 Subject: [PATCH 01/10] Feature: Manual and auto classpath option - Adding option to put additional class paths to the builder - Adding option to get automatically the class path for jar files (tested with Spring-Boot) --- .gitignore | 1 + README.md | 4 ++++ warp4j | 39 +++++++++++++++++++++++++++++++++++---- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 98c43f0..4c3a4d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ fatjar/ warped/ TODO.md +/.project diff --git a/README.md b/README.md index 541a05a..6d114c9 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,8 @@ Options: override JDK/JRE version examples: "11", "11.0", "11.0.2", "11.0.2+9" (default: 11) + -cp, --class-path + adds additional classpaths to the jdeps call -o, --output override output directory; this is relative to current PWD @@ -81,6 +83,8 @@ Options: --pull check if more recent JDK/JRE distro is available; by default latest cached version that matches "--java-version" is used + --spring-boot extract from (Spring-Boot) jar the dependencies' + to get the classpath for jdeps call' --linux create binary for Linux --macos create binary for macOS --windows create binary for Windows diff --git a/warp4j b/warp4j index bac0480..41b092f 100755 --- a/warp4j +++ b/warp4j @@ -11,6 +11,8 @@ function print_help { echo ' override JDK/JRE version' echo ' examples: "11", "11.0", "11.0.2", "11.0.2+9"' echo ' (default: 11)' + echo ' -cp, --class-path ' + echo ' adds additional classpaths to the jdeps call' echo ' -o, --output ' echo ' override output directory;' echo ' this is relative to current PWD' @@ -27,6 +29,8 @@ function print_help { echo ' --pull check if more recent JDK/JRE distro is available;' echo ' by default latest cached version that matches' echo ' "--java-version" is used' + echo ' --spring-boot extract from (Spring-Boot) jar the dependencies' + echo ' to get the classpath for jdeps call' echo ' --linux create binary for Linux' echo ' --macos create binary for macOS' echo ' --windows create binary for Windows' @@ -104,6 +108,10 @@ while [[ $# -gt 0 ]]; do print_help exit ;; + -cp|--class-path) + CLASS_PATH="$2" + shift 2 + ;; -j|--java-version) JAVA_VERSION="$2" JAVA_VERSION_OVERRIDEN=true @@ -145,6 +153,10 @@ while [[ $# -gt 0 ]]; do JVM_OPTIONS="$2" shift 2 ;; + --spring-boot) + SPRING_BOOT=true + shift + ;; -*|--*) # unsupported options fail_with "Unsupported option $1" ;; @@ -369,6 +381,11 @@ fi JAVA_DOWNLOAD_PATH=$CACHE_PATH/$JAVA_DISTRO_TYPE/$JVM_IMPL BUNDLES_PATH=$CACHE_PATH/bundle # prepare bundles here +# path for extracted jar (Spring-Boot) files +EXTRACTED_JAR_PATH=$CACHE_PATH/app-jar # prepare bundles here +mkdir -p ${EXTRACTED_JAR_PATH} +trap 'rm -rf ${EXTRACTED_JAR_PATH}' EXIT + DIR="$(pwd -P)" # execution directory path # final binaries created in WARPED_TEMP_PATH and then moved to WARPED_PATH @@ -407,10 +424,10 @@ SETLOCAL SET "JAVA_DIST='"$BUNDLED_DISTRO_SUBDIR"'" SET "JAR='"$JAR_NAME"'.jar" -SET "JAVA=%~dp0\%JAVA_DIST%\bin\java.exe" +SET "JAVA=%~dp0\%JAVA_DIST%\bin\javaw.exe" SET "JAR_PATH=%~dp0\%JAR%" -CALL %JAVA% '"$JVM_OPTIONS"' -jar %JAR_PATH% %* +START %JAVA% '"$JVM_OPTIONS"' -jar %JAR_PATH% %* EXIT /B %ERRORLEVEL% ' } @@ -620,7 +637,21 @@ JDEPS=$JDK_PATH/bin/jdeps if [[ $JAVA_DISTRO_TYPE == $DISTRO_TYPE_JDK ]]; then echo "Analyzing dependencies..." # TODO check for errors - MODULES=$("$JDEPS" --print-module-deps "$JAR" | grep -v Warning) + # TODO If JAVA_VERSION is not an INT it will throw an error + if [ -n "$CLASS_PATH" ] + then + echo "Using given classpaths: $CLASS_PATH" + MODULES=$("$JDEPS" -cp $CLASS_PATH --print-module-deps --ignore-missing-deps --multi-release $JAVA_VERSION_BASE "$JAR" | grep -v Warning) + elif [ "$SPRING_BOOT" ] + then + echo "Extracting jar file to get classpath" + unzip -q "${JAR}" -d "${EXTRACTED_JAR_PATH}" + echo "Fetching modules" + MODULES=$("$JDEPS" -classpath \'${EXTRACTED_JAR_PATH}/BOOT-INF/lib/*:${EXTRACTED_JAR_PATH}/BOOT-INF/classes:${EXTRACTED_JAR_PATH}\' --print-module-deps --ignore-missing-deps --module-path ${EXTRACTED_JAR_PATH}/BOOT-INF/lib/javax.activation-api-1.2.0.jar --recursive --multi-release ${JAVA_VERSION_BASE} -quiet ${EXTRACTED_JAR_PATH}/org ${EXTRACTED_JAR_PATH}/BOOT-INF/classes ${EXTRACTED_JAR_PATH}/BOOT-INF/lib/*.jar | grep -v Warning) + else + echo "Fetch modules with default behavior" + MODULES=$("$JDEPS" --print-module-deps --ignore-missing-deps --multi-release $JAVA_VERSION_BASE "$JAR" | grep -v Warning) + fi fi # creates minimized runtime for the platform @@ -734,4 +765,4 @@ function warp_targets() { } # actually create binaries and archives for all targets -warp_targets +warp_targets \ No newline at end of file -- 2.45.2 From 8babb073d39380992dafeb84902f759212a4d074 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 11 Aug 2022 22:28:29 +0200 Subject: [PATCH 02/10] Feature: Manual and auto classpath option - Updating README.md (draft) - Updating install (draft) --- README.md | 2 +- install | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6d114c9..c924ba2 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Just put both `warp4j` and `warp-packer` somewhere in your PATH and run `warp4j Curl one-liner installs latest versions of both `warp4j` and `warp-packer`: ``` -$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/guziks/warp4j/stable/install)" +$ bash -c "$(curl -fsSL https://git.kirby-link.dd-dns.de/public/warp4j/src/branch/feature/manual_and_auto_classpath_option/install)" ``` This script will show missing dependencies (if there are any), they must be installed with your package manager. diff --git a/install b/install index 6000523..3337a1a 100755 --- a/install +++ b/install @@ -35,7 +35,7 @@ THIS_PLATFORM=$(get_this_platform) function get_latest_warp_link() { local this_platform=$1 local info - info=$(curl -fsSL https://api.github.com/repos/dgiagio/warp/releases) + info=$(curl -fsSL https://git.kirby-link.dd-dns.de/api/v1/repos/public/warp/releases?draft=false&pre-release=false) if [[ $? != 0 ]]; then echo "Error: Failed to get information about releases" >&2 fail @@ -91,7 +91,7 @@ function get_missing_deps() { done } -WARP4J_LINK="https://raw.githubusercontent.com/guziks/warp4j/stable/warp4j" +WARP4J_LINK="https://git.kirby-link.dd-dns.de/public/warp4j/raw/branch/feature/manual_and_auto_classpath_option/warp4j" echo "Getting information about warp-packer releases..." WARP_LINK=$(get_latest_warp_link $THIS_PLATFORM) -- 2.45.2 From 5ae894e34a0870d274b0eb5e67c099b047abdc1d Mon Sep 17 00:00:00 2001 From: david Date: Thu, 11 Aug 2022 22:35:23 +0200 Subject: [PATCH 03/10] Feature: Manual and auto classpath option - Fixing url in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c924ba2..870e382 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Just put both `warp4j` and `warp-packer` somewhere in your PATH and run `warp4j Curl one-liner installs latest versions of both `warp4j` and `warp-packer`: ``` -$ bash -c "$(curl -fsSL https://git.kirby-link.dd-dns.de/public/warp4j/src/branch/feature/manual_and_auto_classpath_option/install)" +$ bash -c "$(curl -fsSL https://git.kirby-link.dd-dns.de/public/warp4j/raw/branch/feature/manual_and_auto_classpath_option/install)" ``` This script will show missing dependencies (if there are any), they must be installed with your package manager. -- 2.45.2 From 81dd7332c724d5f619f730a889d28fd8977c40d3 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 11 Aug 2022 22:39:08 +0200 Subject: [PATCH 04/10] Feature: Manual and auto classpath option - Fixing url in install file --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 3337a1a..8019de4 100755 --- a/install +++ b/install @@ -35,7 +35,7 @@ THIS_PLATFORM=$(get_this_platform) function get_latest_warp_link() { local this_platform=$1 local info - info=$(curl -fsSL https://git.kirby-link.dd-dns.de/api/v1/repos/public/warp/releases?draft=false&pre-release=false) + info=$(curl -fsSL https://git.kirby-link.dd-dns.de/api/v1/repos/public/warp/releases) if [[ $? != 0 ]]; then echo "Error: Failed to get information about releases" >&2 fail -- 2.45.2 From 7037c6a791211c1fb03ff137761352997e48c1c2 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 11 Aug 2022 23:08:25 +0200 Subject: [PATCH 05/10] Feature: Manual and auto classpath option - Making download url static in install file --- install | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/install b/install index 8019de4..5979401 100755 --- a/install +++ b/install @@ -12,7 +12,9 @@ function fail() { # platform IDs LIN=linux +LIN_URL=https://git.kirby-link.dd-dns.de/attachments/f701fbff-c58b-4aac-91e3-47efda1fc760 MAC=macos +MAC_URL=https://git.kirby-link.dd-dns.de/attachments/b09c6469-406a-4dd1-b5e8-1294a3aabf0f WIN=windows # returns this platform ID @@ -32,20 +34,14 @@ function get_this_platform() { THIS_PLATFORM=$(get_this_platform) # fetches latest release download link for the platform -function get_latest_warp_link() { +function get_warp_link() { local this_platform=$1 - local info - info=$(curl -fsSL https://git.kirby-link.dd-dns.de/api/v1/repos/public/warp/releases) - if [[ $? != 0 ]]; then - echo "Error: Failed to get information about releases" >&2 - fail - fi - echo "$info" \ - | grep "browser_download_url" \ - | grep "$this_platform-x64.warp-packer" \ - | head -n 1 \ - | awk '{print $2}' \ - | sed -e 's/"//g' + + if [ "$this_platform" = "$LIN" ]; then + echo "$LIN_URL" + else + echo "$MAC_URL" + fi } # downloads and installs single binary @@ -94,7 +90,7 @@ function get_missing_deps() { WARP4J_LINK="https://git.kirby-link.dd-dns.de/public/warp4j/raw/branch/feature/manual_and_auto_classpath_option/warp4j" echo "Getting information about warp-packer releases..." -WARP_LINK=$(get_latest_warp_link $THIS_PLATFORM) +WARP_LINK=$(get_warp_link $THIS_PLATFORM) MISSING_DEPS=$(get_missing_deps) -- 2.45.2 From 9255ff9f33ff2fe46e57cf303d6da657d7deec60 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 12 Aug 2022 14:28:37 +0200 Subject: [PATCH 06/10] Feature: Manual and auto classpath option - Setting LTS from version 11 to 17 - Fixing jdep call - Updating README.md --- README.md | 5 +++-- warp4j | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 870e382..22a191a 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,8 @@ Turn JAR (java archive) into self-contained executable Options: -j, --java-version override JDK/JRE version - examples: "11", "11.0", "11.0.2", "11.0.2+9" - (default: 11) + examples: "17", "17.0", "17.0.2", "17.0.2+9" + (default: 17) -cp, --class-path adds additional classpaths to the jdeps call -o, --output @@ -104,6 +104,7 @@ Options: Tested on the following operating systems: +- Debian 10.8 - Ubuntu 18.04 - macOS Mojave - Windows Subsystem for Linux with Ubuntu 14.04 diff --git a/warp4j b/warp4j index 41b092f..ded42f1 100755 --- a/warp4j +++ b/warp4j @@ -9,8 +9,8 @@ function print_help { echo 'Options:' echo ' -j, --java-version ' echo ' override JDK/JRE version' - echo ' examples: "11", "11.0", "11.0.2", "11.0.2+9"' - echo ' (default: 11)' + echo ' examples: "17", "17.0", "17.0.2", "17.0.2+9"' + echo ' (default: 17)' echo ' -cp, --class-path ' echo ' adds additional classpaths to the jdeps call' echo ' -o, --output ' @@ -235,7 +235,7 @@ if [[ $JVM_IMPL ]] && fail_with "jvm implementation \"$JVM_IMPL\" is not correct" fi -LATEST_LTS=11 # latest LTS java branch +LATEST_LTS=17 # latest LTS java branch # default options test -z $JAVA_VERSION && JAVA_VERSION=$LATEST_LTS @@ -640,16 +640,16 @@ if [[ $JAVA_DISTRO_TYPE == $DISTRO_TYPE_JDK ]]; then # TODO If JAVA_VERSION is not an INT it will throw an error if [ -n "$CLASS_PATH" ] then - echo "Using given classpaths: $CLASS_PATH" - MODULES=$("$JDEPS" -cp $CLASS_PATH --print-module-deps --ignore-missing-deps --multi-release $JAVA_VERSION_BASE "$JAR" | grep -v Warning) + echo "Using given classpaths: $CLASS_PATH" + MODULES=$($JDEPS --class-path=$CLASS_PATH --print-module-deps --ignore-missing-deps --multi-release $JAVA_VERSION_BASE $JAR | grep -v Warning) elif [ "$SPRING_BOOT" ] then - echo "Extracting jar file to get classpath" - unzip -q "${JAR}" -d "${EXTRACTED_JAR_PATH}" - echo "Fetching modules" - MODULES=$("$JDEPS" -classpath \'${EXTRACTED_JAR_PATH}/BOOT-INF/lib/*:${EXTRACTED_JAR_PATH}/BOOT-INF/classes:${EXTRACTED_JAR_PATH}\' --print-module-deps --ignore-missing-deps --module-path ${EXTRACTED_JAR_PATH}/BOOT-INF/lib/javax.activation-api-1.2.0.jar --recursive --multi-release ${JAVA_VERSION_BASE} -quiet ${EXTRACTED_JAR_PATH}/org ${EXTRACTED_JAR_PATH}/BOOT-INF/classes ${EXTRACTED_JAR_PATH}/BOOT-INF/lib/*.jar | grep -v Warning) + echo "Extracting jar file to get classpath" + unzip -q "${JAR}" -d "${EXTRACTED_JAR_PATH}" + echo "Fetching modules" + MODULES=$($JDEPS --ignore-missing-deps --print-module-deps --recursive --multi-release $JAVA_VERSION_BASE -quiet --class-path=${EXTRACTED_JAR_PATH}/BOOT-INF/lib/* --module-path=${EXTRACTED_JAR_PATH}/BOOT-INF/lib/BOOT-INF/lib/* $JAR | grep -v Warning) else - echo "Fetch modules with default behavior" + echo "Fetch modules with default behavior" MODULES=$("$JDEPS" --print-module-deps --ignore-missing-deps --multi-release $JAVA_VERSION_BASE "$JAR" | grep -v Warning) fi fi -- 2.45.2 From caccbe74e409285ef16cea6470fbd1c9d59f68db Mon Sep 17 00:00:00 2001 From: david Date: Fri, 12 Aug 2022 16:09:15 +0200 Subject: [PATCH 07/10] Feature: Manual and auto classpath option - Using java instead javac to get an output console --- warp4j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/warp4j b/warp4j index ded42f1..b575715 100755 --- a/warp4j +++ b/warp4j @@ -424,7 +424,7 @@ SETLOCAL SET "JAVA_DIST='"$BUNDLED_DISTRO_SUBDIR"'" SET "JAR='"$JAR_NAME"'.jar" -SET "JAVA=%~dp0\%JAVA_DIST%\bin\javaw.exe" +SET "JAVA=%~dp0\%JAVA_DIST%\bin\java.exe" SET "JAR_PATH=%~dp0\%JAR%" START %JAVA% '"$JVM_OPTIONS"' -jar %JAR_PATH% %* -- 2.45.2 From ff575c0d83c79656aa50760f608427dd02ffdcda Mon Sep 17 00:00:00 2001 From: david Date: Fri, 12 Aug 2022 17:25:22 +0200 Subject: [PATCH 08/10] Feature: Manual and auto classpath option - Renaming option --spring-boot to --auto-class-path - Adding option -s and --silent to use javaw for windows programs --- warp4j | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/warp4j b/warp4j index b575715..f853a10 100755 --- a/warp4j +++ b/warp4j @@ -13,6 +13,8 @@ function print_help { echo ' (default: 17)' echo ' -cp, --class-path ' echo ' adds additional classpaths to the jdeps call' + echo ' --auto-class-path extract and get class-path values from jar file' + echo ' ignored when -cp, --class-path is set' echo ' -o, --output ' echo ' override output directory;' echo ' this is relative to current PWD' @@ -29,7 +31,6 @@ function print_help { echo ' --pull check if more recent JDK/JRE distro is available;' echo ' by default latest cached version that matches' echo ' "--java-version" is used' - echo ' --spring-boot extract from (Spring-Boot) jar the dependencies' echo ' to get the classpath for jdeps call' echo ' --linux create binary for Linux' echo ' --macos create binary for macOS' @@ -43,6 +44,7 @@ function print_help { echo ' "java -jar ";' echo ' use quotes when passing multiple options' echo " example: '-Xms512m -Xmx1024m'" + echo ' -s, --silent using javaw instead of java for windows' echo ' -h, --help show this message' exit } @@ -153,8 +155,12 @@ while [[ $# -gt 0 ]]; do JVM_OPTIONS="$2" shift 2 ;; - --spring-boot) - SPRING_BOOT=true + --auto-class-path) + AUTO_CLASS_PATH=true + shift + ;; + -s|--silent) + SILENT=true shift ;; -*|--*) # unsupported options @@ -381,7 +387,7 @@ fi JAVA_DOWNLOAD_PATH=$CACHE_PATH/$JAVA_DISTRO_TYPE/$JVM_IMPL BUNDLES_PATH=$CACHE_PATH/bundle # prepare bundles here -# path for extracted jar (Spring-Boot) files +# path for extracted jar files EXTRACTED_JAR_PATH=$CACHE_PATH/app-jar # prepare bundles here mkdir -p ${EXTRACTED_JAR_PATH} trap 'rm -rf ${EXTRACTED_JAR_PATH}' EXIT @@ -407,7 +413,7 @@ JAVA_DIST='"$BUNDLED_DISTRO_SUBDIR"' JAR='"$JAR_NAME"'.jar DIR="$(cd "$(dirname "$0")" ; pwd -P)" -JAVA=$DIR/$JAVA_DIST/bin/java +JAVA=$DIR/$JAVA_DIST/bin/'"$JAVA_EXEC"' JAR_PATH=$DIR/$JAR exec "$JAVA" '"$JVM_OPTIONS"' -jar "$JAR_PATH" "$@" @@ -424,7 +430,7 @@ SETLOCAL SET "JAVA_DIST='"$BUNDLED_DISTRO_SUBDIR"'" SET "JAR='"$JAR_NAME"'.jar" -SET "JAVA=%~dp0\%JAVA_DIST%\bin\java.exe" +SET "JAVA=%~dp0\%JAVA_DIST%\bin\'"$JAVA_EXEC"' SET "JAR_PATH=%~dp0\%JAR%" START %JAVA% '"$JVM_OPTIONS"' -jar %JAR_PATH% %* @@ -642,7 +648,7 @@ if [[ $JAVA_DISTRO_TYPE == $DISTRO_TYPE_JDK ]]; then then echo "Using given classpaths: $CLASS_PATH" MODULES=$($JDEPS --class-path=$CLASS_PATH --print-module-deps --ignore-missing-deps --multi-release $JAVA_VERSION_BASE $JAR | grep -v Warning) - elif [ "$SPRING_BOOT" ] + elif [ "$AUTO_CLASS_PATH" ] then echo "Extracting jar file to get classpath" unzip -q "${JAR}" -d "${EXTRACTED_JAR_PATH}" @@ -672,6 +678,13 @@ function create_optimized_runtime() { # creates warp bundle for the platform function create_bundle() { local platform=$1 + + if [[ $SILENT ]] && [[ $platform == $WIN ]]; then + JAVA_EXEC=javaw + else + JAVA_EXEC=java + fi + case $JAVA_DISTRO_TYPE in $DISTRO_TYPE_JDK) create_optimized_runtime $platform -- 2.45.2 From 7604890611a1818021084e35271059ad368636eb Mon Sep 17 00:00:00 2001 From: david Date: Fri, 12 Aug 2022 18:30:07 +0200 Subject: [PATCH 09/10] Feature: Manual and auto classpath option - Adjusting links in documentation --- Dockerfile | 2 +- INSTALL.md | 2 +- README.md | 9 +++++---- install | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3927659..6c6eb34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && apt-get install -y \ zip \ && rm -rf /var/lib/apt/lists/* RUN curl -fsSL -o /tmp/warp-packer \ - https://github.com/dgiagio/warp/releases/download/v0.3.0/linux-x64.warp-packer \ + https://git.kirby-link.dd-dns.de/attachments/f701fbff-c58b-4aac-91e3-47efda1fc760 \ && install -D \ --mode=755 \ --owner=root \ diff --git a/INSTALL.md b/INSTALL.md index 4296992..5dfd2a9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -8,7 +8,7 @@ First install [warp-packer](https://github.com/dgiagio/warp/releases) and ensure ``` $ LOCATION=/usr/local/bin \ -LINK=https://raw.githubusercontent.com/guziks/warp4j/stable/warp4j \ +LINK=https://git.kirby-link.dd-dns.de/public/warp4j/raw/branch/master/warp4j \ TEMP_LOCATION=/tmp/warp4j \ bash -c 'curl -fsSL -o $TEMP_LOCATION $LINK && \ sudo install -D \ diff --git a/README.md b/README.md index 22a191a..3bdbd20 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Turn JAR (java archive) into self-contained executable in a single command. - downloads java runtimes automatically - makes runtimes optimized for your application -- creates self-contained binaries for Linux, macOS and Windows using [warp-packer](https://github.com/dgiagio/warp) +- creates self-contained binaries for Linux, macOS and Windows using [warp-packer](https://git.kirby-link.dd-dns.de/public/warp) - works on Linux, macOS and Windows (with Windows Subsystem for Linux) - supports cross "compilation" - does not require neither JDK nor JRE installed @@ -20,7 +20,7 @@ Just put both `warp4j` and `warp-packer` somewhere in your PATH and run `warp4j Curl one-liner installs latest versions of both `warp4j` and `warp-packer`: ``` -$ bash -c "$(curl -fsSL https://git.kirby-link.dd-dns.de/public/warp4j/raw/branch/feature/manual_and_auto_classpath_option/install)" +$ bash -c "$(curl -fsSL https://git.kirby-link.dd-dns.de/public/warp4j/raw/branch/master/install)" ``` This script will show missing dependencies (if there are any), they must be installed with your package manager. @@ -67,6 +67,8 @@ Options: (default: 17) -cp, --class-path adds additional classpaths to the jdeps call + --auto-class-path extract and get class-path values from jar file + ignored when -cp, --class-path is set -o, --output override output directory; this is relative to current PWD @@ -83,8 +85,6 @@ Options: --pull check if more recent JDK/JRE distro is available; by default latest cached version that matches "--java-version" is used - --spring-boot extract from (Spring-Boot) jar the dependencies' - to get the classpath for jdeps call' --linux create binary for Linux --macos create binary for macOS --windows create binary for Windows @@ -97,6 +97,7 @@ Options: "java -jar "; use quotes when passing multiple options example: '-Xms512m -Xmx1024m' + -s, --silent using javaw instead of java for windows -h, --help show this message ``` diff --git a/install b/install index 5979401..a107c08 100755 --- a/install +++ b/install @@ -87,7 +87,7 @@ function get_missing_deps() { done } -WARP4J_LINK="https://git.kirby-link.dd-dns.de/public/warp4j/raw/branch/feature/manual_and_auto_classpath_option/warp4j" +WARP4J_LINK="https://git.kirby-link.dd-dns.de/public/warp4j/raw/branch/master/warp4j" echo "Getting information about warp-packer releases..." WARP_LINK=$(get_warp_link $THIS_PLATFORM) -- 2.45.2 From 13e0c7c71fb8f57dea87aedaa145eb2316d4a0c8 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 12 Aug 2022 18:35:58 +0200 Subject: [PATCH 10/10] Feature: Manual and auto classpath option - Adjusting links in documentation --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 5dfd2a9..a15c2af 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -4,7 +4,7 @@ Here are several more ways to install `warp4j`. ## Manual -First install [warp-packer](https://github.com/dgiagio/warp/releases) and ensure other common tools available: `awk`, `curl`, `file`, `grep`, `sed`, `sort`, `tar`, `unzip`, optional: `zip`. Then install `warp4j` like this: +First install [warp-packer](https://git.kirby-link.dd-dns.de/public/warp/releases) and ensure other common tools available: `awk`, `curl`, `file`, `grep`, `sed`, `sort`, `tar`, `unzip`, optional: `zip`. Then install `warp4j` like this: ``` $ LOCATION=/usr/local/bin \ -- 2.45.2