@@ -56,10 +56,8 @@ function retry_with_backoff {
5656# Given a folder containing a maven multi-module, assign the variable 'submodules' to a
5757# comma-delimited list of <folder>/<submodule>.
5858function parse_submodules() {
59- pushd " $1 " > /dev/null
60-
6159 submodules_array=()
62- mvn_submodules=$( mvn help:evaluate -Dexpression=project.modules)
60+ mvn_submodules=$( mvn help:evaluate -Dexpression=project.modules -pl " $1 " )
6361 if mvn_submodules=$( grep ' <.*>.*</.*>' <<< " $mvn_submodules" ) ; then
6462 mvn_submodules=$( sed -e ' s/<.*>\(.*\)<\/.*>/\1/g' <<< " $mvn_submodules" )
6563 for submodule in $mvn_submodules ; do
@@ -77,8 +75,6 @@ function parse_submodules() {
7775 echo " ${submodules_array[*]} "
7876 )
7977 export submodules
80-
81- popd > /dev/null
8278}
8379
8480# Given a list of folders containing maven multi-modules, assign the variable 'all_submodules' to a
@@ -347,15 +343,3 @@ function install_modules() {
347343 -T 1C
348344 fi
349345}
350-
351- scriptDir=$( realpath $( dirname " ${BASH_SOURCE[0]} " ) )
352- root_dir=$( realpath " $scriptDir /.." )
353- function install_dependencies() {
354- target_module_path=$( realpath " $1 " )
355- rel_target_path=$( realpath --relative-to=" $root_dir " " $target_module_path " )
356- echo " Resolving dependencies for $rel_target_path ..."
357- dependencies=$( python3 " $scriptDir /determine_dependencies.py" " $1 " )
358- echo " Found dependencies: $dependencies "
359-
360- install_modules " ${dependencies} "
361- }
0 commit comments