You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by jo...@apache.org on 2015/07/14 20:43:34 UTC
spark git commit: [SPARK-8933] [BUILD] Provide a --force flag to
build/mvn that always uses downloaded maven
Repository: spark
Updated Branches:
refs/heads/master 37f2d9635 -> c4e98ff06
[SPARK-8933] [BUILD] Provide a --force flag to build/mvn that always uses downloaded maven
added --force flag to manually download, if necessary, and use a built-in version of maven best for spark
Author: Brennon York <br...@capitalone.com>
Closes #7374 from brennonyork/SPARK-8933 and squashes the following commits:
d673127 [Brennon York] added --force flag to manually download, if necessary, and use a built-in version of maven best for spark
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c4e98ff0
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c4e98ff0
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c4e98ff0
Branch: refs/heads/master
Commit: c4e98ff066cc6f0839d15140eb471d74a0d83e91
Parents: 37f2d96
Author: Brennon York <br...@capitalone.com>
Authored: Tue Jul 14 11:43:26 2015 -0700
Committer: Josh Rosen <jo...@databricks.com>
Committed: Tue Jul 14 11:43:26 2015 -0700
----------------------------------------------------------------------
build/mvn | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/c4e98ff0/build/mvn
----------------------------------------------------------------------
diff --git a/build/mvn b/build/mvn
index e836418..f62f61e 100755
--- a/build/mvn
+++ b/build/mvn
@@ -112,10 +112,17 @@ install_scala() {
# the environment
ZINC_PORT=${ZINC_PORT:-"3030"}
+# Check for the `--force` flag dictating that `mvn` should be downloaded
+# regardless of whether the system already has a `mvn` install
+if [ "$1" == "--force" ]; then
+ FORCE_MVN=1
+ shift
+fi
+
# Install Maven if necessary
MVN_BIN="$(command -v mvn)"
-if [ ! "$MVN_BIN" ]; then
+if [ ! "$MVN_BIN" -o -n "$FORCE_MVN" ]; then
install_mvn
fi
@@ -139,5 +146,7 @@ fi
# Set any `mvn` options if not already present
export MAVEN_OPTS=${MAVEN_OPTS:-"$_COMPILE_JVM_OPTS"}
+echo "Using \`mvn\` from path: $MVN_BIN"
+
# Last, call the `mvn` command as usual
${MVN_BIN} "$@"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org