From 7961b321666faea371fa0de27596f2aea499869e Mon Sep 17 00:00:00 2001 From: ulysses-you Date: Sat, 16 Oct 2021 19:23:45 +0800 Subject: [PATCH] [KYUUBI #1241] Build Spark extension fat jar with common module ### _Why are the changes needed?_ see https://github.com/apache/incubator-kyuubi/issues/1241 ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #1242 from ulysses-you/KYUUBI-1241. Closes #1241 a8e25c37 [ulysses-you] address comment d25a3664 [ulysses-you] version 3c982938 [ulysses-you] Build Spark extension fat jar with common module Authored-by: ulysses-you Signed-off-by: ulysses-you --- build/dist | 2 +- dev/kyuubi-extension-spark-3-1/pom.xml | 23 ++++++++++++++++++++ dev/kyuubi-extension-spark-3-2/pom.xml | 30 +++++++++++++++----------- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/build/dist b/build/dist index fc3562d1d..27310d974 100755 --- a/build/dist +++ b/build/dist @@ -201,7 +201,7 @@ if [[ -f "$KYUUBI_HOME/tools/spark-block-cleaner/target/spark-block-cleaner_${SC fi # Copy Kyuubi extension -SPARK_EXTENSION_VERSIONS=('3-1') +SPARK_EXTENSION_VERSIONS=('3-1' '3-2') for SPARK_EXTENSION_VERSION in ${SPARK_EXTENSION_VERSIONS[@]}; do if [[ -f $"$KYUUBI_HOME/dev/kyuubi-extension-spark-$SPARK_EXTENSION_VERSION/target/kyuubi-extension-spark-${SPARK_EXTENSION_VERSION}_${SCALA_VERSION}-${VERSION}.jar" ]]; then mkdir -p "$DISTDIR/extension" diff --git a/dev/kyuubi-extension-spark-3-1/pom.xml b/dev/kyuubi-extension-spark-3-1/pom.xml index 652a62c3d..1a7d517bf 100644 --- a/dev/kyuubi-extension-spark-3-1/pom.xml +++ b/dev/kyuubi-extension-spark-3-1/pom.xml @@ -131,6 +131,29 @@ target/scala-${scala.binary.version}/classes target/scala-${scala.binary.version}/test-classes + + + + org.apache.maven.plugins + maven-shade-plugin + + false + + + org.apache.kyuubi:kyuubi-extension-spark-common_${scala.binary.version} + + + + + + package + + shade + + + + + diff --git a/dev/kyuubi-extension-spark-3-2/pom.xml b/dev/kyuubi-extension-spark-3-2/pom.xml index 8e61e785e..92d806481 100644 --- a/dev/kyuubi-extension-spark-3-2/pom.xml +++ b/dev/kyuubi-extension-spark-3-2/pom.xml @@ -139,18 +139,24 @@ - net.alchim31.maven - scala-maven-plugin - - - - org.scalastyle - scalastyle-maven-plugin - - - - org.scalatest - scalatest-maven-plugin + org.apache.maven.plugins + maven-shade-plugin + + false + + + org.apache.kyuubi:kyuubi-extension-spark-common_${scala.binary.version} + + + + + + package + + shade + + +