From 536c9328fef799bd7abe5cb8034c134ecfee6459 Mon Sep 17 00:00:00 2001 From: Vladyslav Zhukovskyi Date: Thu, 29 Jul 2021 15:18:35 +0300 Subject: [PATCH] Add additional debug output to the prepare assembly step Signed-off-by: Vladyslav Zhukovskyi --- projector.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/projector.sh b/projector.sh index 2982e1bc..1a110851 100755 --- a/projector.sh +++ b/projector.sh @@ -360,7 +360,30 @@ prepareStaticFiles() { tar -czf "$CURRENT_PROJECTOR_STATIC_ASSEMBLY" static } +checkInstalledJava() { + .log 6 "Check for installed Java" + .log 6 "Read JAVA_HOME env: $JAVA_HOME" + .log 6 "Read PATH env: $PATH" + if [ -n "$(type -p java)" ]; then + .log 6 "Found 'java' executable in PATH" + java_exec=java + elif [ -n "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then + .log 6 "Found 'java' executable in JAVA_HOME" + java_exec="$JAVA_HOME/bin/java" + else + .log 3 "No 'java' executable found" + exit 1 + fi + + if [ "$java_exec" ]; then + java_version=$("$java_exec" -version 2>&1 | awk -F '"' '/version/ {print $2}') + .log 6 "Java version: $java_version" + fi +} + prepareAssembly() { + .log 6 "Prepare assembly" + checkInstalledJava if [ -z "$URL" ]; then .log 7 "Ignoring --tag and --url option" checkConfigurationFileExists @@ -407,6 +430,8 @@ buildContainerImage() { selectPackagingFromPredefinedConfig fi + checkInstalledJava + prepareStaticFiles downloadIdePackaging checkProjectorSourcesExist