From c5b81e581328c50ff7b5d358d83f7693da0a4256 Mon Sep 17 00:00:00 2001 From: dengzh Date: Sun, 6 Jul 2025 02:36:49 +0800 Subject: [PATCH] HIVE-29062: Add standalone module for packaging the Metastore (#5923) --- .gitignore | 1 + packaging/src/docker/Dockerfile | 6 +- packaging/src/docker/build.sh | 4 +- packaging/src/main/assembly/src.xml | 3 + standalone-metastore/metastore-server/pom.xml | 94 --- .../TestCommitTxnEventWithDbAndWriteId.java | 0 standalone-metastore/packaging/pom.xml | 220 ++++++ .../src/assembly/bin.xml | 31 +- .../{ => packaging}/src/assembly/src.xml | 31 +- .../src/docker/Dockerfile | 10 +- .../src/docker/README.md | 4 +- .../src/docker/build.sh | 14 +- .../docker/conf/metastore-log4j2.properties | 0 .../src/docker/conf/metastore-site.xml | 0 .../src/docker/docker-compose.yml | 0 .../src/docker/entrypoint.sh | 0 .../src/license/artifact-filters.txt | 5 + .../packaging/src/license/licenses.xml | 702 ++++++++++++++++++ standalone-metastore/pom.xml | 24 +- 19 files changed, 996 insertions(+), 153 deletions(-) rename standalone-metastore/{ => metastore-server}/src/test/java/org/apache/hadoop/hive/metastore/events/TestCommitTxnEventWithDbAndWriteId.java (100%) create mode 100644 standalone-metastore/packaging/pom.xml rename standalone-metastore/{metastore-server => packaging}/src/assembly/bin.xml (75%) rename standalone-metastore/{ => packaging}/src/assembly/src.xml (59%) rename standalone-metastore/{metastore-server => packaging}/src/docker/Dockerfile (84%) rename standalone-metastore/{metastore-server => packaging}/src/docker/README.md (97%) rename standalone-metastore/{metastore-server => packaging}/src/docker/build.sh (83%) rename standalone-metastore/{metastore-server => packaging}/src/docker/conf/metastore-log4j2.properties (100%) rename standalone-metastore/{metastore-server => packaging}/src/docker/conf/metastore-site.xml (100%) rename standalone-metastore/{metastore-server => packaging}/src/docker/docker-compose.yml (100%) rename standalone-metastore/{metastore-server => packaging}/src/docker/entrypoint.sh (100%) create mode 100644 standalone-metastore/packaging/src/license/artifact-filters.txt create mode 100644 standalone-metastore/packaging/src/license/licenses.xml diff --git a/.gitignore b/.gitignore index 68cf33aff8f0..ab29ea055a62 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ kafka-handler/src/test/gen dependency-reduced-pom.xml **/.mvn/.develocity* packaging/cache +standalone-metastore/packaging/cache \ No newline at end of file diff --git a/packaging/src/docker/Dockerfile b/packaging/src/docker/Dockerfile index 4b27ce2dcf05..fbb4b4d48c9c 100644 --- a/packaging/src/docker/Dockerfile +++ b/packaging/src/docker/Dockerfile @@ -26,9 +26,9 @@ ARG HADOOP_VERSION ARG HIVE_VERSION ARG TEZ_VERSION ONBUILD RUN apt-get update && apt-get -y install wget -ONBUILD RUN wget https://archive.apache.org/dist/tez/$TEZ_VERSION/apache-tez-$TEZ_VERSION-bin.tar.gz && \ +ONBUILD RUN wget https://downloads.apache.org/tez/$TEZ_VERSION/apache-tez-$TEZ_VERSION-bin.tar.gz && \ wget https://archive.apache.org/dist/hadoop/core/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz && \ - wget https://archive.apache.org/dist/hive/hive-$HIVE_VERSION/apache-hive-$HIVE_VERSION-bin.tar.gz + wget https://downloads.apache.org/hive/hive-$HIVE_VERSION/apache-hive-$HIVE_VERSION-bin.tar.gz ONBUILD RUN mv /apache-tez-$TEZ_VERSION-bin.tar.gz /opt && \ mv hadoop-$HADOOP_VERSION.tar.gz /opt && \ mv apache-hive-$HIVE_VERSION-bin.tar.gz /opt @@ -38,7 +38,7 @@ ARG HADOOP_VERSION ARG HIVE_VERSION ARG TEZ_VERSION ONBUILD RUN apt-get update && apt-get -y install wget -ONBUILD RUN wget https://archive.apache.org/dist/tez/$TEZ_VERSION/apache-tez-$TEZ_VERSION-bin.tar.gz && \ +ONBUILD RUN wget https://downloads.apache.org/tez/$TEZ_VERSION/apache-tez-$TEZ_VERSION-bin.tar.gz && \ wget https://archive.apache.org/dist/hadoop/core/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz ONBUILD COPY ./apache-hive-$HIVE_VERSION-bin.tar.gz /opt ONBUILD RUN mv /apache-tez-$TEZ_VERSION-bin.tar.gz /opt && \ diff --git a/packaging/src/docker/build.sh b/packaging/src/docker/build.sh index 9e932ead6df8..66527e2632e9 100755 --- a/packaging/src/docker/build.sh +++ b/packaging/src/docker/build.sh @@ -85,7 +85,7 @@ if [ ! -f "$CACHE_DIR/$HADOOP_FILE_NAME" ]; then fi TEZ_FILE_NAME="apache-tez-$TEZ_VERSION-bin.tar.gz" -TEZ_URL=${TEZ_URL:-"https://archive.apache.org/dist/tez/$TEZ_VERSION/$TEZ_FILE_NAME"} +TEZ_URL=${TEZ_URL:-"https://downloads.apache.org/tez/$TEZ_VERSION/$TEZ_FILE_NAME"} if [ ! -f "$CACHE_DIR/$TEZ_FILE_NAME" ]; then echo "Downloading Tez from $TEZ_URL..." if ! curl --fail -L "$TEZ_URL" -o "$CACHE_DIR/$TEZ_FILE_NAME.tmp"; then @@ -98,7 +98,7 @@ fi if [ -n "$HIVE_VERSION" ]; then HIVE_FILE_NAME="apache-hive-$HIVE_VERSION-bin.tar.gz" if [ ! -f "$CACHE_DIR/$HIVE_FILE_NAME" ]; then - HIVE_URL=${HIVE_URL:-"https://archive.apache.org/dist/hive/hive-$HIVE_VERSION/$HIVE_FILE_NAME"} + HIVE_URL=${HIVE_URL:-"https://downloads.apache.org/hive/hive-$HIVE_VERSION/$HIVE_FILE_NAME"} echo "Downloading Hive from $HIVE_URL..." if ! curl --fail -L "$HIVE_URL" -o "$CACHE_DIR/$HIVE_FILE_NAME.tmp"; then echo "Failed to download Hive, exiting..." diff --git a/packaging/src/main/assembly/src.xml b/packaging/src/main/assembly/src.xml index 9cdbed13776e..88ad117c1970 100644 --- a/packaging/src/main/assembly/src.xml +++ b/packaging/src/main/assembly/src.xml @@ -41,12 +41,14 @@ **/.project **/.settings/** **/thirdparty/** + packaging/cache/** standalone-metastore/metastore-common/src/gen/version/** standalone-metastore/metastore-server/src/gen/** common/src/gen/** kafka-handler/src/test/gen/** conf/hive-default.xml.template **/dependency-reduced-pom.xml + standalone-metastore/packaging/cache/** @@ -106,6 +108,7 @@ standalone-metastore/metastore-server/**/* standalone-metastore/metastore-tools/**/* standalone-metastore/metastore-rest-catalog/**/* + standalone-metastore/packaging/**/* standalone-metastore/src/assembly/src.xml standalone-metastore/pom.xml streaming/**/* diff --git a/standalone-metastore/metastore-server/pom.xml b/standalone-metastore/metastore-server/pom.xml index 7b0f606de2bb..13f08ad92ddb 100644 --- a/standalone-metastore/metastore-server/pom.xml +++ b/standalone-metastore/metastore-server/pom.xml @@ -491,80 +491,6 @@ - - add-extra-deps - - - allModules - true - - - - - org.apache.hive - hive-metastore - ${hive.version} - - - org.apache.hive - hive-standalone-metastore-rest-catalog - ${hive.version} - - - org.apache.hive - hive-iceberg-catalog - - - - - org.apache.hive - hive-exec - ${project.version} - core - - - org.apache.hive - hive-iceberg-handler - ${project.version} - - - org.apache.hive - hive-exec - - - - - - - docker - - - - org.codehaus.mojo - exec-maven-plugin - - - build-docker-image - install - - exec - - - bash - - ${standalone.metastore.path.to.root} - - - src/docker/build.sh - -hadoop ${hadoop.version} - - - - - - - - - - org.apache.maven.plugins - maven-assembly-plugin - - - assemble - package - - single - - - apache-${project.artifactId}-${project.version} - - src/assembly/bin.xml - - posix - - - - org.apache.maven.plugins maven-enforcer-plugin diff --git a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/events/TestCommitTxnEventWithDbAndWriteId.java b/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/events/TestCommitTxnEventWithDbAndWriteId.java similarity index 100% rename from standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/events/TestCommitTxnEventWithDbAndWriteId.java rename to standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/events/TestCommitTxnEventWithDbAndWriteId.java diff --git a/standalone-metastore/packaging/pom.xml b/standalone-metastore/packaging/pom.xml new file mode 100644 index 000000000000..9a9521f0ed04 --- /dev/null +++ b/standalone-metastore/packaging/pom.xml @@ -0,0 +1,220 @@ + + + 4.0.0 + + org.apache.hive + hive-standalone-metastore + 4.1.0 + ../pom.xml + + hive-metastore-packaging + pom + Hive Metastore Packaging + + UTF-8 + .. + 2.3.0 + + + + dist + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + assemble + package + + single + + + ${project.parent.artifactId}-${project.version} + + src/assembly/bin.xml + src/assembly/src.xml + + posix + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + create-bin-license + generate-resources + + run + + + + + + + + + + + + + + + + org.codehaus.mojo + license-maven-plugin + ${maven.license.plugin.version} + + + license-fetch + generate-resources + + download-licenses + + + + + false + ${project.baseUri}/src/license/artifact-filters.txt + true + true + + + https?://glassfish(.dev)?\.java\.net/.*CDDL.* + https://spdx.org/licenses/CDDL-1.1.html + + + https?://asm\.objectweb\.org/license.html + https://asm.ow2.io/license.html + + + http://(www\.)?antlr.org/license.html + http://www.antlr.org/license.html + + + + + https?://www\.apache\.org/licenses/LICENSE-2\.0.* + \Qhttps://aws.amazon.com/apache2.0\E + \Qhttps://opensource.org/licenses/Apache-2.0\E + \Qhttp://www.apache.org/licenses/\E + + + https?://(www\.)?opensource.org/licenses/bsd-license.php + https?://(www\.)?opensource.org/licenses/BSD-2-Clause + + + https?://(www\.)?opensource.org/licenses/BSD-3-Clause + + + \Qhttp://www.fsf.org/licensing/licenses/lgpl.txt\E + \Qhttp://www.gnu.org/licenses/lgpl-3.0.txt\E + + + \Qhttps://www.eclipse.org/org/documents/epl-v10.php\E + \Qhttp://www.eclipse.org/org/documents/epl-v10.php\E + + + \Qhttps://raw.githubusercontent.com/locationtech/jts/master/LICENSE_EPLv2.txt\E + \Qhttps://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt\E + + + \Qhttps://www.eclipse.org/org/documents/edl-v10.php\E + \Qhttp://www.eclipse.org/org/documents/edl-v10.php\E + + + https?://(www\.)?opensource\.org/licenses/mit(-license.php)? + + + + + [\s-_,]+ + - + + + + + + + + + docker + + + + org.codehaus.mojo + exec-maven-plugin + + + package + + exec + + + bash + + ${standalone.metastore.path.to.root} + + + src/docker/build.sh + -hadoop ${hadoop.version} + + + + + + + + + + + + org.apache.hive + hive-metastore + ${hive.version} + + + org.apache.hive + hive-standalone-metastore-rest-catalog + ${project.version} + + + org.apache.hive + hive-iceberg-catalog + + + + + org.apache.hive + hive-exec + ${hive.version} + core + + + org.apache.hive + hive-iceberg-handler + ${hive.version} + + + org.apache.hive + hive-exec + + + + + org.apache.hive + hive-standalone-metastore-common + ${project.version} + + + org.apache.hive + hive-standalone-metastore-server + ${project.version} + + + diff --git a/standalone-metastore/metastore-server/src/assembly/bin.xml b/standalone-metastore/packaging/src/assembly/bin.xml similarity index 75% rename from standalone-metastore/metastore-server/src/assembly/bin.xml rename to standalone-metastore/packaging/src/assembly/bin.xml index 967bc590c0c4..b967e1fcf3d7 100644 --- a/standalone-metastore/metastore-server/src/assembly/bin.xml +++ b/standalone-metastore/packaging/src/assembly/bin.xml @@ -52,7 +52,7 @@ - ${project.basedir} + ${project.parent.basedir} target/** .classpath @@ -71,7 +71,7 @@ 755 - ${project.basedir}/src/main/scripts + ${project.parent.basedir}/metastore-server/src/main/scripts base schematool @@ -83,7 +83,7 @@ - ${project.basedir}/src/main/sql + ${project.parent.basedir}/metastore-server/src/main/sql **/* @@ -91,7 +91,7 @@ - ${project.basedir}/src/gen/thrift/gen-php + ${project.parent.basedir}/metastore-common/src/gen/thrift/gen-php **/* @@ -99,7 +99,7 @@ - ${project.basedir}/src/gen/thrift/gen-py/hive_metastore + ${project.parent.basedir}/metastore-common/src/gen/thrift/gen-py/hive_metastore 755 **/* @@ -108,7 +108,7 @@ - ${project.basedir}/src/main/resources/ + ${project.parent.basedir}/metastore-server/src/main/resources/ 644 metastore-site.xml @@ -116,11 +116,28 @@ conf + + + ${project.build.directory}/generated-resources + + /LICENSE + /licenses.xml + + / + + + ${project.build.directory}/generated-resources/licenses + + /* + + licenses + + - ${project.build.directory}/generated-sources/conf/metastore-site.xml.template + ${project.parent.basedir}/metastore-server/target/generated-sources/conf/metastore-site.xml.template conf diff --git a/standalone-metastore/src/assembly/src.xml b/standalone-metastore/packaging/src/assembly/src.xml similarity index 59% rename from standalone-metastore/src/assembly/src.xml rename to standalone-metastore/packaging/src/assembly/src.xml index 7861f1ca8694..5a6dd8a1e7ec 100644 --- a/standalone-metastore/src/assembly/src.xml +++ b/standalone-metastore/packaging/src/assembly/src.xml @@ -28,28 +28,39 @@ tar.gz - apache-${project.artifactId}-${project.version}-src + apache-hive-metastore-${project.version}-src - ${project.basedir} + ${project.parent.basedir} DEV-README - README* - LICENSE* - NOTICE* + LICENSE + NOTICE pom.xml + metastore-common/**/* + metastore-server/**/* + metastore-tools/**/* + metastore-rest-catalog/**/* + packaging/**/* + checkstyle/**/* + spotbugs/**/* - true - - - ${project.basedir} - true **/*.log **/*.iml + packaging/cache/** **/${project.build.directory}/** + **/dependency-reduced-pom.xml + **/target/** + **/.classpath + **/.project + **/.settings/** + **/*.jar + metastore-common/src/gen/version/** + metastore-server/src/gen/** + / diff --git a/standalone-metastore/metastore-server/src/docker/Dockerfile b/standalone-metastore/packaging/src/docker/Dockerfile similarity index 84% rename from standalone-metastore/metastore-server/src/docker/Dockerfile rename to standalone-metastore/packaging/src/docker/Dockerfile index 74960fef577c..f8ca121c88cc 100644 --- a/standalone-metastore/metastore-server/src/docker/Dockerfile +++ b/standalone-metastore/packaging/src/docker/Dockerfile @@ -18,23 +18,23 @@ ARG BUILD_ENV FROM ubuntu as unarchive ONBUILD COPY hadoop-*.tar.gz /opt -ONBUILD COPY apache-hive-standalone-metastore-server-*-bin.tar.gz /opt +ONBUILD COPY hive-standalone-metastore-*-bin.tar.gz /opt FROM ubuntu as archive ARG HADOOP_VERSION ARG HIVE_VERSION ONBUILD RUN apt-get update && apt-get -y install wget ONBUILD RUN wget https://archive.apache.org/dist/hadoop/core/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz && \ - wget https://archive.apache.org/dist/hive/hive-standalone-metastore-$HIVE_VERSION/apache-hive-standalone-metastore-server-$HIVE_VERSION-bin.tar.gz + wget https://downloads.apache.org/hive/hive-standalone-metastore-$HIVE_VERSION/hive-standalone-metastore-$HIVE_VERSION-bin.tar.gz ONBUILD RUN mv hadoop-$HADOOP_VERSION.tar.gz /opt && \ - mv apache-hive-standalone-metastore-server-$HIVE_VERSION-bin.tar.gz /opt + mv hive-standalone-metastore-$HIVE_VERSION-bin.tar.gz /opt FROM ubuntu as buildarchive ARG HADOOP_VERSION ARG HIVE_VERSION ONBUILD RUN apt-get update && apt-get -y install wget ONBUILD RUN wget https://archive.apache.org/dist/hadoop/core/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz -ONBUILD COPY ./apache-hive-standalone-metastore-server-$HIVE_VERSION-bin.tar.gz /opt +ONBUILD COPY ./hive-standalone-metastore-$HIVE_VERSION-bin.tar.gz /opt ONBUILD RUN mv hadoop-$HADOOP_VERSION.tar.gz /opt FROM ${BUILD_ENV} as env @@ -44,7 +44,7 @@ ARG HIVE_VERSION RUN tar -xzvf /opt/hadoop-$HADOOP_VERSION.tar.gz -C /opt/ && \ rm -rf /opt/hadoop-$HADOOP_VERSION/share/doc/* && \ - tar -xzvf /opt/apache-hive-standalone-metastore-server-$HIVE_VERSION-bin.tar.gz -C /opt/ + tar -xzvf /opt/hive-standalone-metastore-$HIVE_VERSION-bin.tar.gz -C /opt/ FROM eclipse-temurin:17.0.12_7-jre-ubi9-minimal AS run diff --git a/standalone-metastore/metastore-server/src/docker/README.md b/standalone-metastore/packaging/src/docker/README.md similarity index 97% rename from standalone-metastore/metastore-server/src/docker/README.md rename to standalone-metastore/packaging/src/docker/README.md index 3eba41bfeef5..eacbdc7edea8 100644 --- a/standalone-metastore/metastore-server/src/docker/README.md +++ b/standalone-metastore/packaging/src/docker/README.md @@ -51,7 +51,7 @@ The `build.sh` provides ways to build the image against specified version of the ##### Build from source ```shell -mvn clean install -DskipTests -DallModules -Pdocker +mvn clean package -DskipTests -Pdocker ``` ##### Build with specified version There are some arguments to specify the component version: @@ -66,7 +66,7 @@ For example, the following command uses Hive 4.0.0 and Hadoop `hadoop.version` t ```shell ./build.sh -hive 4.0.0 ``` -If the command does not specify the Hive version, it will use the local `apache-hive-standalone-metastore-${project.version}-bin.tar.gz`(will trigger a build if it doesn't exist), +If the command does not specify the Hive version, it will use the local `hive-standalone-metastore-${project.version}-bin.tar.gz`(will trigger a build if it doesn't exist), together with Hadoop 3.1.0 to build the image, ```shell ./build.sh -hadoop 3.1.0 diff --git a/standalone-metastore/metastore-server/src/docker/build.sh b/standalone-metastore/packaging/src/docker/build.sh similarity index 83% rename from standalone-metastore/metastore-server/src/docker/build.sh rename to standalone-metastore/packaging/src/docker/build.sh index e0f9d4dc48d2..80d50503d998 100755 --- a/standalone-metastore/metastore-server/src/docker/build.sh +++ b/standalone-metastore/packaging/src/docker/build.sh @@ -66,7 +66,7 @@ mkdir -p "$CACHE_DIR" HADOOP_VERSION=${HADOOP_VERSION:-$(mvn -f "$SOURCE_DIR/pom.xml" -q help:evaluate -Dexpression=hadoop.version -DforceStdout)} HADOOP_FILE_NAME="hadoop-$HADOOP_VERSION.tar.gz" -HADOOP_URL=${HADOOP_URL:-"https://downloads.apache.org/hadoop/core/hadoop-$HADOOP_VERSION/$HADOOP_FILE_NAME"} +HADOOP_URL=${HADOOP_URL:-"https://archive.apache.org/dist/hadoop/core/hadoop-$HADOOP_VERSION/$HADOOP_FILE_NAME"} if [ ! -f "$CACHE_DIR/$HADOOP_FILE_NAME" ]; then echo "Downloading Hadoop from $HADOOP_URL..." if ! curl --fail -L "$HADOOP_URL" -o "$CACHE_DIR/$HADOOP_FILE_NAME.tmp"; then @@ -77,7 +77,7 @@ if [ ! -f "$CACHE_DIR/$HADOOP_FILE_NAME" ]; then fi if [ -n "$HIVE_VERSION" ]; then - HIVE_FILE_NAME="apache-hive-standalone-metastore-server-$HIVE_VERSION-bin.tar.gz" + HIVE_FILE_NAME="hive-standalone-metastore-$HIVE_VERSION-bin.tar.gz" if [ ! -f "$CACHE_DIR/$HIVE_FILE_NAME" ]; then HIVE_URL=${HIVE_URL:-"https://downloads.apache.org/hive/hive-standalone-metastore-$HIVE_VERSION/$HIVE_FILE_NAME"} echo "Downloading Hive Metastore from $HIVE_URL..." @@ -90,8 +90,8 @@ if [ -n "$HIVE_VERSION" ]; then cp "$CACHE_DIR/$HIVE_FILE_NAME" "$WORK_DIR" else HIVE_VERSION=$(mvn -f "$SOURCE_DIR/pom.xml" -q help:evaluate -Dexpression=project.version -DforceStdout) - HIVE_TAR="$SOURCE_DIR/metastore-server/target/apache-hive-standalone-metastore-server-$HIVE_VERSION-bin.tar.gz" - if ls "$HIVE_TAR" || mvn -f "$SOURCE_DIR/metastore-server/pom.xml" clean package -DskipTests -DallModules; then + HIVE_TAR="$SOURCE_DIR/packaging/target/hive-standalone-metastore-$HIVE_VERSION-bin.tar.gz" + if ls "$HIVE_TAR" || mvn -f "$SOURCE_DIR/pom.xml" clean package -DskipTests -Pdist; then cp "$HIVE_TAR" "$WORK_DIR/" else echo "Failed to compile Hive Metastore project, exiting..." @@ -100,9 +100,9 @@ else fi cp "$CACHE_DIR/hadoop-$HADOOP_VERSION.tar.gz" "$WORK_DIR/" -cp -R "$SOURCE_DIR/metastore-server/src/docker/conf" "$WORK_DIR/" -cp -R "$SOURCE_DIR/metastore-server/src/docker/entrypoint.sh" "$WORK_DIR/" -cp "$SOURCE_DIR/metastore-server/src/docker/Dockerfile" "$WORK_DIR/" +cp -R "$SOURCE_DIR/packaging/src/docker/conf" "$WORK_DIR/" +cp -R "$SOURCE_DIR/packaging/src/docker/entrypoint.sh" "$WORK_DIR/" +cp "$SOURCE_DIR/packaging/src/docker/Dockerfile" "$WORK_DIR/" docker build \ "$WORK_DIR" \ -f "$WORK_DIR/Dockerfile" \ diff --git a/standalone-metastore/metastore-server/src/docker/conf/metastore-log4j2.properties b/standalone-metastore/packaging/src/docker/conf/metastore-log4j2.properties similarity index 100% rename from standalone-metastore/metastore-server/src/docker/conf/metastore-log4j2.properties rename to standalone-metastore/packaging/src/docker/conf/metastore-log4j2.properties diff --git a/standalone-metastore/metastore-server/src/docker/conf/metastore-site.xml b/standalone-metastore/packaging/src/docker/conf/metastore-site.xml similarity index 100% rename from standalone-metastore/metastore-server/src/docker/conf/metastore-site.xml rename to standalone-metastore/packaging/src/docker/conf/metastore-site.xml diff --git a/standalone-metastore/metastore-server/src/docker/docker-compose.yml b/standalone-metastore/packaging/src/docker/docker-compose.yml similarity index 100% rename from standalone-metastore/metastore-server/src/docker/docker-compose.yml rename to standalone-metastore/packaging/src/docker/docker-compose.yml diff --git a/standalone-metastore/metastore-server/src/docker/entrypoint.sh b/standalone-metastore/packaging/src/docker/entrypoint.sh similarity index 100% rename from standalone-metastore/metastore-server/src/docker/entrypoint.sh rename to standalone-metastore/packaging/src/docker/entrypoint.sh diff --git a/standalone-metastore/packaging/src/license/artifact-filters.txt b/standalone-metastore/packaging/src/license/artifact-filters.txt new file mode 100644 index 000000000000..3de82a0bc1a5 --- /dev/null +++ b/standalone-metastore/packaging/src/license/artifact-filters.txt @@ -0,0 +1,5 @@ +exclude gaPattern org\.apache\.hadoop:.* +include scope compile +include scope runtime +exclude scope provided +exclude scope test diff --git a/standalone-metastore/packaging/src/license/licenses.xml b/standalone-metastore/packaging/src/license/licenses.xml new file mode 100644 index 000000000000..f3f631bb50ad --- /dev/null +++ b/standalone-metastore/packaging/src/license/licenses.xml @@ -0,0 +1,702 @@ + + + + + + com.google.flatbuffers + flatbuffers-java + 1.12.0 + + + Apache License V2.0 + https://raw.githubusercontent.com/google/flatbuffers/master/LICENSE.txt + repo + + + + + com.sun.jersey.contribs + jersey-guice + 1.19 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + com.sun.jersey.contribs + jersey-multipart + 1.19 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + com.sun.jersey.contribs + wadl-resourcedoc-doclet + 1.4 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + com.sun.jersey + jersey-client + 1.19 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + com.sun.jersey + jersey-core + 1.19 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + com.sun.jersey + jersey-json + 1.19 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + com.sun.jersey + jersey-server + 1.19 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + com.sun.jersey + jersey-servlet + 1.19 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + com.sun.xml.bind + jaxb-impl + 2.2.3-1 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + commons-el + commons-el + 1.0 + + + The Apache Software License, Version 2.0 + /LICENSE.txt + + + + + jakarta.jms + jakarta.jms-api + 2.0.2 + + + Eclipse Public License v. 2.0 + https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + repo + eclipse-public-license-v.-2.0-epl-2.0.txt + + + + + javax.servlet + javax.servlet-api + 3.1.0 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + javax.ws.rs + javax.ws.rs-api + 2.0.1 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + javax.xml.bind + jaxb-api + 2.2.11 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + net.java.dev.jna + jna + 5.3.1 + + + Apache License v2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + APACHE-2.0 + + + + + org.apache.pig + pig + 0.16.0 + + + Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + repo + APACHE-2.0 + + + + + org.abego.treelayout + org.abego.treelayout.core + 1.0.1 + + + BSD-3-Clause + https://raw.githubusercontent.com/abego/treelayout/master/org.abego.treelayout/src/LICENSE.TXT + repo + + + + + org.codehaus.jackson + jackson-jaxrs + 1.9.2 + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + APACHE-2.0 + + + + + org.codehaus.jackson + jackson-xc + 1.9.2 + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + APACHE-2.0 + + + + + org.cryptacular + cryptacular + 1.2.4 + + + Apache 2 + http://www.apache.org/licenses/LICENSE-2.0.txt + APACHE-2.0 + + + + + org.eclipse.jetty.toolchain + jetty-schemas + 3.1.2 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty.websocket + websocket-api + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty.websocket + websocket-client + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty.websocket + websocket-common + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty.websocket + websocket-server + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty.websocket + websocket-servlet + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + apache-jsp + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jdt + ecj + 3.26.0 + + + Eclipse Public License v. 2.0 + https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt + repo + eclipse-public-license-v.-2.0-epl-2.0.txt + + + + + org.eclipse.jetty + apache-jstl + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-annotations + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-client + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-http + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-io + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-jaas + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-jndi + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-plus + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-rewrite + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-security + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-server + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-servlet + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-util-ajax + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-util + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-webapp + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.eclipse.jetty + jetty-xml + 9.4.57.v20241219 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.ehcache + ehcache + 3.3.1 + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + APACHE-2.0 + + + + + org.javassist + javassist + 3.28.0-GA + + + Apache License 2.0 + http://www.apache.org/licenses/ + APACHE-2.0 + + + + + org.jvnet.mimepull + mimepull + 1.9.3 + + + CDDL 1.1 + https://spdx.org/licenses/CDDL-1.1.html + repo + CDDL-1.1.html + + + + + org.ldaptive + ldaptive + 1.0.13 + + + Apache 2 + http://www.apache.org/licenses/LICENSE-2.0.txt + APACHE-2.0 + + + + + org.lz4 + lz4-java + 1.8.0 + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + APACHE-2.0 + + + + + org.mortbay.jetty + jetty-util + 6.1.26 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.mortbay.jetty + jetty + 6.1.26 + + + Apache Software License - Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.mortbay.jetty + jsp-api-2.1 + 6.1.14 + + + Apache License Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + APACHE-2.0 + + + + + org.mortbay.jetty + servlet-api-2.5 + 6.1.14 + + + CDDL 1.0 + https://spdx.org/licenses/CDDL-1.1.html + + + + + oro + oro + 2.0.8 + + + Apache License Version 1.1 + https://www.apache.org/licenses/LICENSE-1.1 + APACHE-1.1 + + + + + diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml index 63732f94f91b..da0612dcf9e0 100644 --- a/standalone-metastore/pom.xml +++ b/standalone-metastore/pom.xml @@ -30,6 +30,7 @@ metastore-server metastore-tools metastore-rest-catalog + packaging 4.1.0 @@ -544,29 +545,6 @@ - - org.apache.maven.plugins - maven-assembly-plugin - - - assemble - package - - single - - - apache-${project.artifactId}-${project.version} - - tar.gz - - - src/assembly/src.xml - - posix - - - - org.apache.maven.plugins maven-checkstyle-plugin