Skip to content

Commit

Permalink
[BUILD] Remove the extension spark jars before build
Browse files Browse the repository at this point in the history
  • Loading branch information
zwangsheng committed Mar 5, 2024
1 parent 49456bb commit c83b79a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build/dist
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,14 @@ if [[ "$HIVE_PROVIDED" == "true" ]]; then
MVN_DIST_OPT="$MVN_DIST_OPT -Phive-provided"
fi

# Before start build, clean up the extension spark jars,
# to avoid include unspecified version
SPARK_EXTENSION_VERSIONS=('3-1' '3-2' '3-3' '3-4' '3-5')
# shellcheck disable=SC2068
for SPARK_EXTENSION_VERSION in ${SPARK_EXTENSION_VERSIONS[@]}; do
rm -f "$KYUUBI_HOME/extensions/spark/kyuubi-extension-spark-$SPARK_EXTENSION_VERSION/target/kyuubi-extension-spark-${SPARK_EXTENSION_VERSION}_${SCALA_VERSION}-${VERSION}.jar"
done

export MAVEN_OPTS="${MAVEN_OPTS:--Xmx2g}"

BUILD_COMMAND=("$MVN" clean install $MVN_DIST_OPT $@)
Expand Down Expand Up @@ -331,7 +339,6 @@ for jar in $(ls "$DISTDIR/jars/"); do
done

# Copy Kyuubi Spark extension
SPARK_EXTENSION_VERSIONS=('3-1' '3-2' '3-3' '3-4' '3-5')
# shellcheck disable=SC2068
for SPARK_EXTENSION_VERSION in ${SPARK_EXTENSION_VERSIONS[@]}; do
if [[ -f $"$KYUUBI_HOME/extensions/spark/kyuubi-extension-spark-$SPARK_EXTENSION_VERSION/target/kyuubi-extension-spark-${SPARK_EXTENSION_VERSION}_${SCALA_VERSION}-${VERSION}.jar" ]]; then
Expand Down

0 comments on commit c83b79a

Please sign in to comment.