aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/bin
diff options
context:
space:
mode:
authorDmitry Puzikov <dmitry.puzikov@tieto.com>2019-04-16 16:53:15 +0200
committerDmitry Puzikov <dmitry.puzikov@tieto.com>2019-08-28 17:22:25 +0200
commit1a0b23395b66909c46d548a9b14b3497671ebed1 (patch)
tree79574164838a34ec58594436379feee30aa92168 /src/main/bin
parent271ab81ee74f6089a579fc23dd47a9d729c832b7 (diff)
Fixed project version parsing
Fixed pom.xml to execute vesion parsing earlier. Change-Id: Ic5f2c1c304ab025cbac93d5177776c17a8ff803b Issue-ID: INT-801 Signed-off-by: Dmitry Puzikov <dmitry.puzikov@tieto.com>
Diffstat (limited to 'src/main/bin')
-rw-r--r--src/main/bin/start.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh
index 8c4cdf5..1dc4771 100644
--- a/src/main/bin/start.sh
+++ b/src/main/bin/start.sh
@@ -19,6 +19,13 @@
# limitations under the License.
# ============LICENSE_END=========================================================
+# jre-alpine image has $JAVA_HOME set and added to $PATH
+# ubuntu image requires to set $JAVA_HOME and add java to $PATH manually
+if ( uname -v | grep -i "ubuntu" ); then
+ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-`dpkg --print-architecture | awk -F- '{ print $NF }'`
+ export PATH=${JAVA_HOME}:$PATH
+fi
+
APP_HOME="${APP_HOME:-/opt/app/babel}"
if [ -z "${CONFIG_HOME}" ]; then
@@ -41,4 +48,6 @@ fi
JVM_MAX_HEAP=${MAX_HEAP:-1024}
-exec java -Xmx${JVM_MAX_HEAP}m ${PROPS} -jar ${APP_HOME}/babel.jar
+JARFILE=$(ls ./babel*.jar);
+
+exec java -Xmx${JVM_MAX_HEAP}m ${PROPS} -jar ${APP_HOME}/${JARFILE}