Repository: spark Updated Branches: refs/heads/branch-1.0 d7ddb26e1 -> d8f1b33f4
SPARK-1737: Warn rather than fail when Java 7+ is used to create distributions Also moves a few lines of code around in make-distribution.sh. Author: Patrick Wendell <pwend...@gmail.com> Closes #669 from pwendell/make-distribution and squashes the following commits: 8bfac49 [Patrick Wendell] Small fix 46918ec [Patrick Wendell] SPARK-1737: Warn rather than fail when Java 7+ is used to create distributions. (cherry picked from commit 39b8b1489ff92697e4aeec997cdc436c7079d6f8) Signed-off-by: Patrick Wendell <pwend...@gmail.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d8f1b33f Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d8f1b33f Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d8f1b33f Branch: refs/heads/branch-1.0 Commit: d8f1b33f426adffe32b7c75a2f2eae6efdb85697 Parents: d7ddb26 Author: Patrick Wendell <pwend...@gmail.com> Authored: Tue May 6 15:41:46 2014 -0700 Committer: Patrick Wendell <pwend...@gmail.com> Committed: Tue May 6 15:42:00 2014 -0700 ---------------------------------------------------------------------- make-distribution.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/d8f1b33f/make-distribution.sh ---------------------------------------------------------------------- diff --git a/make-distribution.sh b/make-distribution.sh index 8a63133..ebcd8c7 100755 --- a/make-distribution.sh +++ b/make-distribution.sh @@ -39,18 +39,11 @@ # 5) ./bin/spark-shell --master spark://my-master-ip:7077 # +set -o pipefail # Figure out where the Spark framework is installed FWDIR="$(cd `dirname $0`; pwd)" DISTDIR="$FWDIR/dist" -set -o pipefail -VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO" | tail -n 1) -if [ $? != 0 ]; then - echo -e "You need Maven installed to build Spark." - echo -e "Download Maven from https://maven.apache.org/" - exit -1; -fi - if [ -z "$JAVA_HOME" ]; then echo "Error: JAVA_HOME is not set, cannot proceed." exit -1 @@ -59,10 +52,17 @@ fi JAVA_CMD="$JAVA_HOME"/bin/java JAVA_VERSION=$("$JAVA_CMD" -version 2>&1) if ! [[ "$JAVA_VERSION" =~ "1.6" ]]; then - echo "Error: JAVA_HOME must point to a JDK 6 installation (see SPARK-1703)." + echo "***NOTE***: JAVA_HOME is not set to a JDK 6 installation. The resulting" + echo " distribution will not support Java 6. See SPARK-1703." echo "Output from 'java -version' was:" echo "$JAVA_VERSION" - exit -1 +fi + +VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO" | tail -n 1) +if [ $? != 0 ]; then + echo -e "You need Maven installed to build Spark." + echo -e "Download Maven from https://maven.apache.org/" + exit -1; fi # Initialize defaults