Fix jar file search.
Issue-ID: DCAEGEN2-2008
Signed-off-by: Kate Hsuan <kate.hsuan@qct.io>
Change-Id: I46a539efdbbf6d2a9762966cb4740af7f3fd20f6
diff --git a/components/datalake-handler/feeder/src/assembly/run.sh b/components/datalake-handler/feeder/src/assembly/run.sh
index a061bfc..0f9bac4 100644
--- a/components/datalake-handler/feeder/src/assembly/run.sh
+++ b/components/datalake-handler/feeder/src/assembly/run.sh
@@ -6,10 +6,13 @@
echo "finish init db"
-cmd=`ls feeder-*.jar`
-if [ -z "$cmd" ]; then
- echo "STRING is empty"
- sleep 10000
-else
+cmd=`find . -regex '\./feeder-[0-9]+\.[0-9]+\.[0-9]+[-SNAPSHOT]+\.jar'`
+cmd1= `find . -regex '\./feeder-[0-9]+\.[0-9]+\.[0-9]+\.jar'`
+if [ -n "$cmd" ]; then
java -jar $cmd
+elif [ -n "$cmd1" ]; then
+ java -jar $cmd
+else
+ echo"STRING is empty"
+ sleep 10000
fi