aboutsummaryrefslogtreecommitdiffstats
path: root/aai-traversal/src/main/scripts/common_functions.sh
diff options
context:
space:
mode:
authorKajur, Harish (vk250x) <vk250x@att.com>2018-08-13 02:44:43 -0400
committerKajur, Harish (vk250x) <vk250x@att.com>2018-08-13 12:35:56 -0400
commit9220f729873a7be6455f832468f5090ccd2a25cb (patch)
tree26ea9dc633bad1bd9bb0f25465a998cd85e6ee5f /aai-traversal/src/main/scripts/common_functions.sh
parentcdeda67931317caa0582b6e806aaf2df42616170 (diff)
Update traversal to use schema ingest library
Update the traversal microservice to use the ingest library to make the application more model driven Issue-ID: AAI-1465 Change-Id: Ifcf56b5d0e7f25ce2bc735b3186e09bc28234100 Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
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} "$@"
}