File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,17 @@ install_mvn() {
80
80
fi
81
81
if [ $( version $MVN_DETECTED_VERSION ) -lt $( version $MVN_VERSION ) ]; then
82
82
local APACHE_MIRROR=${APACHE_MIRROR:- ' https://www.apache.org/dyn/closer.lua?action=download&filename=' }
83
+
84
+ if [ $( command -v curl) ]; then
85
+ local TEST_MIRROR_URL=" ${APACHE_MIRROR} /maven/maven-3/${MVN_VERSION} /binaries/apache-maven-${MVN_VERSION} -bin.tar.gz"
86
+ if curl -L --output /dev/null --silent --head --fail " $TEST_MIRROR_URL " ; then
87
+ echo " Found Maven at $TEST_MIRROR_URL "
88
+ else
89
+ # Fall back to archive.apache.org for older Maven
90
+ echo " Falling back to archive.apache.org to download Maven"
91
+ APACHE_MIRROR=" https://archive.apache.org/dist"
92
+ fi
93
+ fi
83
94
84
95
install_app \
85
96
" ${APACHE_MIRROR} /maven/maven-3/${MVN_VERSION} /binaries" \
You can’t perform that action at this time.
0 commit comments