blob: c2a232242afe6cf64169b1403444010daec17ece [file] [log] [blame]
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
. `dirname $0`/bigtop.bom
# BIGTOP-2607
sed -i -e /useZincServer/d -e /recompileMode/d pom.xml
BUILD_OPTS="-Divy.home=${HOME}/.ivy2 -Dsbt.ivy.home=${HOME}/.ivy2 -Duser.home=${HOME} \
-Drepo.maven.org=$IVY_MIRROR_PROP \
-Dreactor.repo=file://${HOME}/.m2/repository \
-Dhadoop.version=$HADOOP_VERSION \
-Dyarn.version=$HADOOP_VERSION \
-Dprotobuf.version=2.5.0 \
-DrecompileMode=all \
-Pyarn -Phadoop-2.7 \
-Phive -Phive-thriftserver \
-Psparkr \
$SPARK_BUILD_OPTS"
./dev/make-distribution.sh --r $BUILD_OPTS -DskipTests
SPARK_SKIP_TESTS=$([ "$SPARK_RUN_TESTS" = "true" ] && echo false || echo true)
# make-distribution.sh will only run "mvn clean package", so in order to get the
# Spark packages installed in the local Maven repository (or to run the tests),
# we need to run "mvn install" again. However, it will be relatively fast because
# we are not running the "clean" phase.
#
# This is also the point that we can run the tests if desired, since tests must
# be run after Spark has already been packaged.
# See http://spark.apache.org/docs/latest/building-spark.html#spark-tests-in-maven
mvn $BUILD_OPTS install -DskipTests=$SPARK_SKIP_TESTS