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