aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorPrashant Sharma <prashant.s@imaginea.com>2014-07-11 11:52:35 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-07-11 11:52:35 -0700
commitb23e9c3e4085c0a7faf2c51fd350ad1233aa7a40 (patch)
tree39be1c57044fe23dc11d6574ca3a0728ecdf1df0 /project
parentf4f46dec5ae1da48738b9b650d3de155b59c4674 (diff)
downloadspark-b23e9c3e4085c0a7faf2c51fd350ad1233aa7a40.tar.gz
spark-b23e9c3e4085c0a7faf2c51fd350ad1233aa7a40.tar.bz2
spark-b23e9c3e4085c0a7faf2c51fd350ad1233aa7a40.zip
[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 <prashant.s@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
Diffstat (limited to 'project')
-rw-r--r--project/SparkBuild.scala9
1 files changed, 7 insertions, 2 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index b55c50560b..44abbc152f 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 (