# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
# Uses wget to fetch a project's maven-metadata.xml files from a Maven repository.
# Check for "-f" maven param, indicating a change in pom location.
pom_path="pom.xml"
# Uses wget to fetch a project's maven-metadata.xml files from a Maven repository.
# Check for "-f" maven param, indicating a change in pom location.
pom_path="pom.xml"
-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
project=$(xmlstarlet sel \
-N "x=http://maven.apache.org/POM/4.0.0" -t \
--if "/x:project/x:groupId" \
project=$(xmlstarlet sel \
-N "x=http://maven.apache.org/POM/4.0.0" -t \
--if "/x:project/x:groupId" \