-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-14477][BUILD] Allow custom mirrors for downloading artifacts in build/mvn #12250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't really feel like over optimizing this to read the same variable as the previous function, so I am just redefining it in each of the functions. |
||
|
|
||
| install_app \ | ||
| "https://downloads.typesafe.com/scala/${scala_version}" \ | ||
| "${TYPESAFE_MIRROR}/scala/${scala_version}" \ | ||
| "scala-${scala_version}.tgz" \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is unrelated to your change, but I wonder if Spark really needs to download the Scala distribution like this, or if the maven/ivy dependency resolution is enough. |
||
| "scala-${scala_version}/bin/scala" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't use a trailing slash in the definition of the default value here since I'd rather have 2 slashes at the end (if the user did define it) instead of no slash.