You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/07/11 20:52:39 UTC
git commit: [SPARK-2437] Rename MAVEN_PROFILES to SBT_MAVEN_PROFILES
and add SBT_MAVEN_PROPERTIES
Repository: spark
Updated Branches:
refs/heads/master f4f46dec5 -> b23e9c3e4
[SPARK-2437] Rename MAVEN_PROFILES to SBT_MAVEN_PROFILES and add SBT_MAVEN_PROPERTIES
NOTE: It is not possible to use both env variable `SBT_MAVEN_PROFILES` and `-P` flag at same time. `-P` if specified takes precedence.
Author: Prashant Sharma <pr...@imaginea.com>
Closes #1374 from ScrapCodes/SPARK-2437/rename-MAVEN_PROFILES and squashes the following commits:
8694bde [Prashant Sharma] [SPARK-2437] Rename MAVEN_PROFILES to SBT_MAVEN_PROFILES and add SBT_MAVEN_PROPERTIES
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/b23e9c3e
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/b23e9c3e
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/b23e9c3e
Branch: refs/heads/master
Commit: b23e9c3e4085c0a7faf2c51fd350ad1233aa7a40
Parents: f4f46de
Author: Prashant Sharma <pr...@imaginea.com>
Authored: Fri Jul 11 11:52:35 2014 -0700
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Fri Jul 11 11:52:35 2014 -0700
----------------------------------------------------------------------
project/SparkBuild.scala | 9 +++++++--
sbt/sbt-launch-lib.bash | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/b23e9c3e/project/SparkBuild.scala
----------------------------------------------------------------------
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index b55c505..44abbc1 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -86,9 +86,8 @@ object SparkBuild extends PomBuild {
profiles
}
- override val profiles = Properties.envOrNone("MAVEN_PROFILES") match {
+ override val profiles = Properties.envOrNone("SBT_MAVEN_PROFILES") match {
case None => backwardCompatibility
- // Rationale: If -P option exists no need to support backwardCompatibility.
case Some(v) =>
if (backwardCompatibility.nonEmpty)
println("Note: We ignore environment variables, when use of profile is detected in " +
@@ -96,6 +95,12 @@ object SparkBuild extends PomBuild {
v.split("(\\s+|,)").filterNot(_.isEmpty).map(_.trim.replaceAll("-P", "")).toSeq
}
+ Properties.envOrNone("SBT_MAVEN_PROPERTIES") match {
+ case Some(v) =>
+ v.split("(\\s+|,)").filterNot(_.isEmpty).map(_.split("=")).foreach(x => System.setProperty(x(0), x(1)))
+ case _ =>
+ }
+
override val userPropertiesMap = System.getProperties.toMap
lazy val sharedSettings = graphSettings ++ ScalaStyleSettings ++ Seq (
http://git-wip-us.apache.org/repos/asf/spark/blob/b23e9c3e/sbt/sbt-launch-lib.bash
----------------------------------------------------------------------
diff --git a/sbt/sbt-launch-lib.bash b/sbt/sbt-launch-lib.bash
index 857b62f..c91fecf 100755
--- a/sbt/sbt-launch-lib.bash
+++ b/sbt/sbt-launch-lib.bash
@@ -92,7 +92,7 @@ addJava () {
enableProfile () {
dlog "[enableProfile] arg = '$1'"
maven_profiles=( "${maven_profiles[@]}" "$1" )
- export MAVEN_PROFILES="${maven_profiles[@]}"
+ export SBT_MAVEN_PROFILES="${maven_profiles[@]}"
}
addSbt () {