File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,8 +71,11 @@ install_mvn() {
7171 local MVN_DETECTED_VERSION=" $( mvn --version | head -n1 | awk ' {print $3}' ) "
7272 fi
7373 if [ $( version $MVN_DETECTED_VERSION ) -lt $( version $MVN_VERSION ) ]; then
74- local APACHE_MIRROR=${APACHE_MIRROR:- ' https://www.apache.org/dyn/closer.lua?action=download&filename=' }
75-
74+ local DEFAULT_APACHE_MIRROR=` curl --silent -X GET -I " https://www.apache.org/dyn/closer.lua?action=download" | grep " Location:" | cut -f2 -d' ' | tr -d ' \n' | tr -d ' \r' | sed ' s%^\(.*\)/$%\1%' `
75+ echo " Default Apache mirror is ${DEFAULT_APACHE_MIRROR} "
76+ local APACHE_MIRROR=${APACHE_MIRROR:- $DEFAULT_APACHE_MIRROR }
77+ echo " Trying mirror ${APACHE_MIRROR} "
78+
7679 if [ $( command -v curl) ]; then
7780 local TEST_MIRROR_URL=" ${APACHE_MIRROR} /maven/maven-3/${MVN_VERSION} /binaries/apache-maven-${MVN_VERSION} -bin.tar.gz"
7881 if ! curl -L --output /dev/null --silent --head --fail " $TEST_MIRROR_URL " ; then
You can’t perform that action at this time.
0 commit comments