diff options
author | Cheng Lian <lian.cs.zju@gmail.com> | 2014-08-29 15:29:43 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-08-29 15:29:43 -0700 |
commit | 287c0ac7722dd4bc51b921ccc6f0e3c1625b5ff4 (patch) | |
tree | 8e073252b423441eaac133abcb4398828ad56ba9 | |
parent | 2f1519defaba4f3c7d536669f909bfd9e13e4069 (diff) | |
download | spark-287c0ac7722dd4bc51b921ccc6f0e3c1625b5ff4.tar.gz spark-287c0ac7722dd4bc51b921ccc6f0e3c1625b5ff4.tar.bz2 spark-287c0ac7722dd4bc51b921ccc6f0e3c1625b5ff4.zip |
[SPARK-3234][Build] Fixed environment variables that rely on deprecated command line options in make-distribution.sh
Please refer to [SPARK-3234](https://issues.apache.org/jira/browse/SPARK-3234) for details.
Author: Cheng Lian <lian.cs.zju@gmail.com>
Closes #2208 from liancheng/spark-3234 and squashes the following commits:
fb26de8 [Cheng Lian] Fixed SPARK-3234
-rwxr-xr-x | make-distribution.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/make-distribution.sh b/make-distribution.sh index f7a6a9d838..ee13990711 100755 --- a/make-distribution.sh +++ b/make-distribution.sh @@ -113,7 +113,17 @@ if ! which mvn &>/dev/null; then echo -e "Download Maven from https://maven.apache.org/" exit -1; fi + VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO" | tail -n 1) +SPARK_HADOOP_VERSION=$(mvn help:evaluate -Dexpression=hadoop.version $@ 2>/dev/null\ + | grep -v "INFO"\ + | tail -n 1) +SPARK_HIVE=$(mvn help:evaluate -Dexpression=project.activeProfiles $@ 2>/dev/null\ + | grep -v "INFO"\ + | fgrep --count "<id>hive</id>";\ + # Reset exit status to 0, otherwise the script stops here if the last grep finds nothing\ + # because we use "set -o pipefail" + echo -n) JAVA_CMD="$JAVA_HOME"/bin/java JAVA_VERSION=$("$JAVA_CMD" -version 2>&1) @@ -175,7 +185,7 @@ cp "$FWDIR"/examples/target/scala*/spark-examples*.jar "$DISTDIR/lib/" mkdir -p "$DISTDIR/examples/src/main" cp -r "$FWDIR"/examples/src/main "$DISTDIR/examples/src/" -if [ "$SPARK_HIVE" == "true" ]; then +if [ "$SPARK_HIVE" == "1" ]; then cp "$FWDIR"/lib_managed/jars/datanucleus*.jar "$DISTDIR/lib/" fi |