diff options
Diffstat (limited to 'aai-resources/src/main/scripts/common_functions.sh')
-rw-r--r-- | aai-resources/src/main/scripts/common_functions.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/aai-resources/src/main/scripts/common_functions.sh b/aai-resources/src/main/scripts/common_functions.sh index 768a911..9c8e275 100644 --- a/aai-resources/src/main/scripts/common_functions.sh +++ b/aai-resources/src/main/scripts/common_functions.sh @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/bin/bash # # ============LICENSE_START======================================================= # org.onap.aai @@ -49,15 +49,24 @@ execute_spring_jar(){ shift 2; - EXECUTABLE_JAR=$(ls ${PROJECT_HOME}/lib/aai-resources-*.jar); + EXECUTABLE_JAR=$(ls ${PROJECT_HOME}/lib/*.jar); - JAVA_OPTS="${JAVA_PRE_OPTS}"; - JAVA_OPTS="-DAJSC_HOME=$PROJECT_HOME"; + JAVA_OPTS="${JAVA_PRE_OPTS} -DAJSC_HOME=$PROJECT_HOME"; JAVA_OPTS="$JAVA_OPTS -DBUNDLECONFIG_DIR=resources"; JAVA_OPTS="$JAVA_OPTS -Daai.home=$PROJECT_HOME "; JAVA_OPTS="$JAVA_OPTS -Dhttps.protocols=TLSv1.1,TLSv1.2"; JAVA_OPTS="$JAVA_OPTS -Dloader.main=${className}"; + JAVA_OPTS="$JAVA_OPTS -Dloader.path=${PROJECT_HOME}/resources"; JAVA_OPTS="$JAVA_OPTS -Dlogback.configurationFile=${logbackFile}"; + + export SOURCE_NAME=$(grep '^schema.source.name=' ${PROJECT_HOME}/resources/application.properties | cut -d"=" -f2-); + # Needed for the schema ingest library beans + eval $(grep '^schema\.' ${PROJECT_HOME}/resources/application.properties | \ + sed 's/^\(.*\)$/JAVA_OPTS="$JAVA_OPTS -D\1"/g' | \ + sed 's/${server.local.startpath}/${PROJECT_HOME}\/resources/g'| \ + sed 's/${schema.source.name}/'${SOURCE_NAME}'/g'\ + ) + JAVA_OPTS="${JAVA_OPTS} ${JAVA_POST_OPTS}"; ${JAVA_HOME}/bin/java ${JVM_OPTS} ${JAVA_OPTS} -jar ${EXECUTABLE_JAR} "$@" |