fix: Submodules removed when Jdep collects necessary modules

This commit is contained in:
david 2025-02-01 08:49:25 +01:00
parent c130b303d7
commit 7f3554690d

3
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 --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, -) 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\.)' | sed 's|/.*||' | 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"
@ -706,6 +706,7 @@ if [[ $JAVA_DISTRO_TYPE == $DISTRO_TYPE_JDK ]]; then
echo "Adding additional modules to optimized JDK: $ADD_MODULES" echo "Adding additional modules to optimized JDK: $ADD_MODULES"
MODULES=$ADD_MODULES,$MODULES MODULES=$ADD_MODULES,$MODULES
fi fi
echo "Collected modules: $MODULES"
fi fi
# creates minimized runtime for the platform # creates minimized runtime for the platform