Skip to content

Commit af08afc

Browse files
committed
[SPARK-27550][TEST] Fix test-dependencies.sh not to use kafka-0-8 profile for Scala-2.12
1 parent b615f22 commit af08afc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

dev/test-dependencies.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,23 @@ export LC_ALL=C
2929
# TODO: This would be much nicer to do in SBT, once SBT supports Maven-style resolution.
3030

3131
# NOTE: These should match those in the release publishing script
32-
HADOOP2_MODULE_PROFILES="-Phive-thriftserver -Pmesos -Pkafka-0-8 -Pkubernetes -Pyarn -Pflume -Phive"
3332
MVN="build/mvn"
3433
HADOOP_PROFILES=(
3534
hadoop-2.6
3635
hadoop-2.7
3736
hadoop-3.1
3837
)
3938

39+
SCALA_VERSION=$("$MVN" help:evaluate -Dexpression=scala.binary.version $@ 2>/dev/null\
40+
| grep -v "INFO"\
41+
| grep -v "WARNING"\
42+
| tail -n 1)
43+
if [ "$SCALA_VERSION" = "2.11" ]; then
44+
HADOOP2_MODULE_PROFILES="-Phive-thriftserver -Pmesos -Pkafka-0-8 -Pkubernetes -Pyarn -Pflume -Phive"
45+
else
46+
HADOOP2_MODULE_PROFILES="-Phive-thriftserver -Pmesos -Pkubernetes -Pyarn -Pflume -Phive"
47+
fi
48+
4049
# We'll switch the version to a temp. one, publish POMs using that new version, then switch back to
4150
# the old version. We need to do this because the `dependency:build-classpath` task needs to
4251
# resolve Spark's internal submodule dependencies.

0 commit comments

Comments
 (0)