Skip to content

Commit d71f1bb

Browse files
author
Marcelo Vanzin
committed
And sbt too.
1 parent 6bda399 commit d71f1bb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

project/SparkBuild.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ object SparkBuild extends PomBuild {
119119
lazy val publishLocalBoth = TaskKey[Unit]("publish-local", "publish local for m2 and ivy")
120120

121121
lazy val sharedSettings = graphSettings ++ genjavadocSettings ++ Seq (
122-
javaHome := Properties.envOrNone("JAVA_HOME").map(file),
122+
javaHome := sys.props.get("java.home").map(file),
123123
incOptions := incOptions.value.withNameHashing(true),
124124
retrieveManaged := true,
125125
retrievePattern := "[type]s/[artifact](-[revision])(-[classifier]).[ext]",
@@ -426,8 +426,10 @@ object TestSettings {
426426
fork := true,
427427
// Setting SPARK_DIST_CLASSPATH is a simple way to make sure any child processes
428428
// launched by the tests have access to the correct test-time classpath.
429-
envVars in Test += ("SPARK_DIST_CLASSPATH" ->
430-
(fullClasspath in Test).value.files.map(_.getAbsolutePath).mkString(":").stripSuffix(":")),
429+
envVars in Test ++= Map(
430+
"SPARK_DIST_CLASSPATH" ->
431+
(fullClasspath in Test).value.files.map(_.getAbsolutePath).mkString(":").stripSuffix(":"),
432+
"JAVA_HOME" -> sys.props("java.home")),
431433
javaOptions in Test += "-Dspark.test.home=" + sparkHome,
432434
javaOptions in Test += "-Dspark.testing=1",
433435
javaOptions in Test += "-Dspark.port.maxRetries=100",

0 commit comments

Comments
 (0)