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 - artifactId=$(grep -E "^ <artifactId>.*</artifactId>$" ${pd}/pom.xml | \ 18 + if [ -f ${pd}/pom.xml ]; then
19 - sed 's/.[^>]*>//;s/<.*//') 19 + artifactId=$(grep -E "^ <artifactId>.*</artifactId>$" ${pd}/pom.xml | \
20 - modulesERE="$modulesERE|$artifactId" 20 + sed 's/.[^>]*>//;s/<.*//')
21 + modulesERE="$modulesERE|$artifactId"
22 + fi
21 done 23 done
22 modulesERE=${modulesERE#|*} 24 modulesERE=${modulesERE#|*}
23 25
......