Skip to content

Commit 6bed2d9

Browse files
committed
upgrade to Maven 3.3.3
1 parent 7d669a5 commit 6bed2d9

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

build/mvn

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,14 @@ install_app() {
6969

7070
# Install maven under the build/ folder
7171
install_mvn() {
72+
local MVN_VERSION="3.3.3"
73+
7274
install_app \
73-
"http://archive.apache.org/dist/maven/maven-3/3.2.5/binaries" \
74-
"apache-maven-3.2.5-bin.tar.gz" \
75-
"apache-maven-3.2.5/bin/mvn"
76-
MVN_BIN="${_DIR}/apache-maven-3.2.5/bin/mvn"
75+
"http://archive.apache.org/dist/maven/maven-3/${MVN_VERSION}/binaries" \
76+
"apache-maven-${MVN_VERSION}-bin.tar.gz" \
77+
"apache-maven-${MVN_VERSION}/bin/mvn"
78+
79+
MVN_BIN="${_DIR}/apache-maven-${MVN_VERSION}/bin/mvn"
7780
}
7881

7982
# Install zinc under the build/ folder
@@ -105,28 +108,16 @@ install_scala() {
105108
SCALA_LIBRARY="$(cd "$(dirname ${scala_bin})/../lib" && pwd)/scala-library.jar"
106109
}
107110

108-
# Determines if a given application is already installed. If not, will attempt
109-
# to install
110-
## Arg1 - application name
111-
## Arg2 - Alternate path to local install under build/ dir
112-
check_and_install_app() {
113-
# create the local environment variable in uppercase
114-
local app_bin="`echo $1 | awk '{print toupper(\$0)}'`_BIN"
115-
# some black magic to set the generated app variable (i.e. MVN_BIN) into the
116-
# environment
117-
eval "${app_bin}=`which $1 2>/dev/null`"
118-
119-
if [ -z "`which $1 2>/dev/null`" ]; then
120-
install_$1
121-
fi
122-
}
123-
124111
# Setup healthy defaults for the Zinc port if none were provided from
125112
# the environment
126113
ZINC_PORT=${ZINC_PORT:-"3030"}
127114

128-
# Check and install all applications necessary to build Spark
129-
check_and_install_app "mvn"
115+
# Install Maven if necessary
116+
MVN_BIN="$(command -v mvn)"
117+
118+
if [ ! "$MVN_BIN" ]; then
119+
install_mvn
120+
fi
130121

131122
# Install the proper version of Scala and Zinc for the build
132123
install_zinc

0 commit comments

Comments
 (0)