-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-4429][BUILD] Build for Scala 2.11 using sbt fails. #3342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the profile so Maven will turn it on if the property |
||
| } | ||
|
|
||
| Properties.envOrNone("SBT_MAVEN_PROPERTIES") match { | ||
|
|
||
There was a problem hiding this comment.
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.