summaryrefslogtreecommitdiffstats
path: root/aai-traversal/src/main/scripts/common_functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'aai-traversal/src/main/scripts/common_functions.sh')
-rw-r--r--aai-traversal/src/main/scripts/common_functions.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/aai-traversal/src/main/scripts/common_functions.sh b/aai-traversal/src/main/scripts/common_functions.sh
index 8bd881a..3aeb865 100644
--- a/aai-traversal/src/main/scripts/common_functions.sh
+++ b/aai-traversal/src/main/scripts/common_functions.sh
@@ -29,7 +29,7 @@ execute_spring_jar(){
shift 2;
- EXECUTABLE_JAR=$(ls ${PROJECT_HOME}/lib/aai-traversal-*SNAPSHOT.jar);
+ EXECUTABLE_JAR=$(ls ${PROJECT_HOME}/lib/*.jar);
JAVA_OPTS="${JAVA_PRE_OPTS}";
JAVA_OPTS="-DAJSC_HOME=$PROJECT_HOME";
@@ -40,6 +40,14 @@ execute_spring_jar(){
JAVA_OPTS="$JAVA_OPTS -Dlogback.configurationFile=${logbackFile}";
JAVA_OPTS="${JAVA_OPTS} ${JAVA_POST_OPTS}";
+ 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_HOME}/bin/java ${JVM_OPTS} ${JAVA_OPTS} -jar ${EXECUTABLE_JAR} "$@"
}