You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2019/09/04 04:11:29 UTC
[spark] branch master updated: [SPARK-28963][BUILD] Fall back to
archive.apache.org in build/mvn for older releases
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new df39855 [SPARK-28963][BUILD] Fall back to archive.apache.org in build/mvn for older releases
df39855 is described below
commit df39855db826fd4bead85a2ca01eda15c101bbbe
Author: Sean Owen <se...@databricks.com>
AuthorDate: Wed Sep 4 13:11:09 2019 +0900
[SPARK-28963][BUILD] Fall back to archive.apache.org in build/mvn for older releases
### What changes were proposed in this pull request?
Fall back to archive.apache.org in `build/mvn` to download Maven, in case the ASF mirrors no longer have an older release.
### Why are the changes needed?
If an older release's specified Maven doesn't exist in the mirrors, {{build/mvn}} will fail.
### Does this PR introduce any user-facing change?
No
### How was this patch tested?
Manually tested different paths and failures by commenting in/out parts of the script and modifying it directly.
Closes #25667 from srowen/SPARK-28963.
Authored-by: Sean Owen <se...@databricks.com>
Signed-off-by: HyukjinKwon <gu...@apache.org>
---
build/mvn | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/build/mvn b/build/mvn
index 75feb2f..f68377b 100755
--- a/build/mvn
+++ b/build/mvn
@@ -80,6 +80,15 @@ install_mvn() {
fi
if [ $(version $MVN_DETECTED_VERSION) -lt $(version $MVN_VERSION) ]; then
local APACHE_MIRROR=${APACHE_MIRROR:-'https://www.apache.org/dyn/closer.lua?action=download&filename='}
+
+ if [ $(command -v curl) ]; then
+ local TEST_MIRROR_URL="${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries/apache-maven-${MVN_VERSION}-bin.tar.gz"
+ if ! curl -L --output /dev/null --silent --head --fail "$TEST_MIRROR_URL" ; then
+ # Fall back to archive.apache.org for older Maven
+ echo "Falling back to archive.apache.org to download Maven"
+ APACHE_MIRROR="https://archive.apache.org/dist"
+ fi
+ fi
install_app \
"${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries" \
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org