fix: Improved transitive dependency detection for jdeps call

This commit is contained in:
david 2025-01-17 07:41:33 +01:00
parent 2e2d45ca29
commit bbd8d9f60f

2
warp4j
View File

@ -685,7 +685,7 @@ if [[ $JAVA_DISTRO_TYPE == $DISTRO_TYPE_JDK ]]; then
if [ -n "$CLASS_PATH" ] if [ -n "$CLASS_PATH" ]
then then
echo "Using given classpaths: $CLASS_PATH" 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) MODULES=$($JDEPS --class-path $CLASS_PATH --ignore-missing-deps --list-deps --multi-release $JAVA_VERSION_BASE $JAR | awk '{print $1}' | grep -Ev '^(Warning|Error:|Not\sfound|.*\.jar$|ch\.|com\.|org\.)' | sort -u | paste -sd, -)
elif [ "$AUTO_CLASS_PATH" ] elif [ "$AUTO_CLASS_PATH" ]
then then
echo "Extracting jar file to get classpath" echo "Extracting jar file to get classpath"