-file_path=$(echo $MAVEN_PARAMS | grep -E "\-f \S+" | awk '{ print $2 }')
-if [ ! -z $file_path ]; then
- if [ -d $file_path ]; then
+file_path=$(echo "$MAVEN_PARAMS" | grep -Eo "\-f \S+" | awk '{ print $2 }')
+if [ -n "$file_path" ]; then
+ if [ -d "$file_path" ]; then