You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by va...@apache.org on 2016/04/08 19:10:24 UTC
spark git commit: [SPARK-14477][BUILD] Allow custom mirrors for
downloading artifacts in build/mvn
Repository: spark
Updated Branches:
refs/heads/master 583b5e053 -> a9b630f42
[SPARK-14477][BUILD] Allow custom mirrors for downloading artifacts in build/mvn
## What changes were proposed in this pull request?
Allows to override locations for downloading Apache and Typesafe artifacts in build/mvn script.
## How was this patch tested?
By running script like
````
# Remove all previously downloaded artifacts
rm -rf build/apache-maven*
rm -rf build/zinc-*
rm -rf build/scala-*
# Make sure path is clean and doesn't contain mvn, for example.
...
# Run a command without setting anything and make sure it succeeds
build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
# Run a command setting the default location as mirror and make sure it succeeds
APACHE_MIRROR=http://mirror.infra.cloudera.com/apache/ build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
# Do the same without the trailing slash this time and make sure it succeeds
APACHE_MIRROR=http://mirror.infra.cloudera.com/apache build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
# Do it with a bad URL and make sure it fails
APACHE_MIRROR=xyz build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.6.0 package
````
Author: Mark Grover <ma...@apache.org>
Closes #12250 from markgrover/spark-14477.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a9b630f4
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a9b630f4
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a9b630f4
Branch: refs/heads/master
Commit: a9b630f42ac0c6be3437f206beddaf0ef737f5c8
Parents: 583b5e0
Author: Mark Grover <ma...@apache.org>
Authored: Fri Apr 8 10:10:10 2016 -0700
Committer: Marcelo Vanzin <va...@cloudera.com>
Committed: Fri Apr 8 10:10:10 2016 -0700
----------------------------------------------------------------------
build/mvn | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/a9b630f4/build/mvn
----------------------------------------------------------------------
diff --git a/build/mvn b/build/mvn
index 41c0850..54b815d 100755
--- a/build/mvn
+++ b/build/mvn
@@ -70,9 +70,10 @@ install_app() {
# Install maven under the build/ folder
install_mvn() {
local MVN_VERSION="3.3.9"
+ local APACHE_MIRROR=${APACHE_MIRROR:-https://archive.apache.org/dist}
install_app \
- "https://archive.apache.org/dist/maven/maven-3/${MVN_VERSION}/binaries" \
+ "${APACHE_MIRROR}/maven/maven-3/${MVN_VERSION}/binaries" \
"apache-maven-${MVN_VERSION}-bin.tar.gz" \
"apache-maven-${MVN_VERSION}/bin/mvn"
@@ -83,8 +84,10 @@ install_mvn() {
install_zinc() {
local zinc_path="zinc-0.3.9/bin/zinc"
[ ! -f "${_DIR}/${zinc_path}" ] && ZINC_INSTALL_FLAG=1
+ local TYPESAFE_MIRROR=${TYPESAFE_MIRROR:-https://downloads.typesafe.com}
+
install_app \
- "https://downloads.typesafe.com/zinc/0.3.9" \
+ "${TYPESAFE_MIRROR}/zinc/0.3.9" \
"zinc-0.3.9.tgz" \
"${zinc_path}"
ZINC_BIN="${_DIR}/${zinc_path}"
@@ -98,9 +101,10 @@ install_scala() {
local scala_version=`grep "scala.version" "${_DIR}/../pom.xml" | \
head -1 | cut -f2 -d'>' | cut -f1 -d'<'`
local scala_bin="${_DIR}/scala-${scala_version}/bin/scala"
+ local TYPESAFE_MIRROR=${TYPESAFE_MIRROR:-https://downloads.typesafe.com}
install_app \
- "https://downloads.typesafe.com/scala/${scala_version}" \
+ "${TYPESAFE_MIRROR}/scala/${scala_version}" \
"scala-${scala_version}.tgz" \
"scala-${scala_version}/bin/scala"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org