Charles Chan
Committed by Gerrit Code Review

Skip the directory if it does not have a POM file

Change-Id: I78e2315b834b5719b6968a5667e6c865b8bfb75a
...@@ -15,9 +15,11 @@ if [ -n "$projects" ]; then ...@@ -15,9 +15,11 @@ if [ -n "$projects" ]; then
15 # Ascertain artifact IDs of the projects to be rebuilt 15 # Ascertain artifact IDs of the projects to be rebuilt
16 modulesERE="" 16 modulesERE=""
17 for pd in ${projects//,/ }; do 17 for pd in ${projects//,/ }; do
18 + if [ -f ${pd}/pom.xml ]; then
18 artifactId=$(grep -E "^ <artifactId>.*</artifactId>$" ${pd}/pom.xml | \ 19 artifactId=$(grep -E "^ <artifactId>.*</artifactId>$" ${pd}/pom.xml | \
19 sed 's/.[^>]*>//;s/<.*//') 20 sed 's/.[^>]*>//;s/<.*//')
20 modulesERE="$modulesERE|$artifactId" 21 modulesERE="$modulesERE|$artifactId"
22 + fi
21 done 23 done
22 modulesERE=${modulesERE#|*} 24 modulesERE=${modulesERE#|*}
23 25
......