Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,10 @@ 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") == "") {
System.setProperty("scala-2.11", "true")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment here and link to the maven code this is replicating? It might be tricky for other developers to understand why this exists.

}
profiles
}

Properties.envOrNone("SBT_MAVEN_PROPERTIES") match {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we no longer need to turn the scala-2.10 profile on in this case? Will Maven turn it on automatically?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the profile scala-2.10 is activated by the condition:

<property><name>!scala-2.11</name></property>

so Maven will turn it on if the property scala-2.11 is null or empty.

Expand Down