Skip to content

Commit dcc2d54

Browse files
committed
[SPARK-19550][HOTFIX][BUILD] Use JAVA_HOME/bin/java if JAVA_HOME is set in dev/mima
## What changes were proposed in this pull request? Use JAVA_HOME/bin/java if JAVA_HOME is set in dev/mima script to run MiMa This follows on #16871 -- it's a slightly separate issue, but, is currently causing a build failure. ## How was this patch tested? Manually tested. Author: Sean Owen <[email protected]> Closes #16957 from srowen/SPARK-19550.2.
1 parent 54a30c8 commit dcc2d54

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dev/mima

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ OLD_DEPS_CLASSPATH="$(build/sbt -DcopyDependencies=false $SPARK_PROFILES "export
3030

3131
rm -f .generated-mima*
3232

33-
java \
33+
if [[ -x "$JAVA_HOME/bin/java" ]]; then
34+
JAVA_CMD="$JAVA_HOME/bin/java"
35+
else
36+
JAVA_CMD=java
37+
fi
38+
39+
$JAVA_CMD \
3440
-Xmx2g \
3541
-cp "$TOOLS_CLASSPATH:$OLD_DEPS_CLASSPATH" \
3642
org.apache.spark.tools.GenerateMIMAIgnore

0 commit comments

Comments
 (0)