Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions build/mvn
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Copy link
Member Author

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.


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"

Expand All @@ -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}"
Expand All @@ -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}
Copy link
Member Author

Choose a reason for hiding this comment

The 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" \
Copy link
Contributor

Choose a reason for hiding this comment

The 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"

Expand Down