aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
Diffstat (limited to 'project')
-rw-r--r--project/SparkBuild.scala13
1 files changed, 6 insertions, 7 deletions
diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala
index c1879ce4ba..0cb2820973 100644
--- a/project/SparkBuild.scala
+++ b/project/SparkBuild.scala
@@ -101,14 +101,13 @@ object SparkBuild extends PomBuild {
v.split("(\\s+|,)").filterNot(_.isEmpty).map(_.trim.replaceAll("-P", "")).toSeq
}
- if (profiles.exists(_.contains("scala-"))) {
- profiles
- } else if (System.getProperty("scala-2.11") != null) {
- profiles ++ Seq("scala-2.11")
- } else {
- println("Enabled default scala profile")
- profiles ++ Seq("scala-2.10")
+ if (System.getProperty("scala-2.11") == "") {
+ // To activate scala-2.11 profile, replace empty property value to non-empty value
+ // in the same way as Maven which handles -Dname as -Dname=true before executes build process.
+ // see: https://github.com/apache/maven/blob/maven-3.0.4/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L1082
+ System.setProperty("scala-2.11", "true")
}
+ profiles
}
Properties.envOrNone("SBT_MAVEN_PROPERTIES") match {