From 4f355effccedf1cf387b66af8794194bbf5483c4 Mon Sep 17 00:00:00 2001 From: Vinish Reddy Date: Wed, 16 Apr 2025 17:27:01 -0700 Subject: [PATCH 1/2] Package bundled jars with separate pom.xml configurations --- packaging/xtable-aws-bundle/pom.xml | 79 +++++++++++++++++++ .../org/apache/xtable/aws/bundle/Main.java | 28 +++++++ .../src/main/resources/META-INF/LICENSE | 0 .../META-INF/licenses/LICENSE-antlr4-runtime | 0 .../META-INF/licenses/LICENSE-checker-qual | 0 .../LICENSE-glassfish-java-servlet-jsp | 0 .../licenses/LICENSE-javax-annotation-api | 0 .../META-INF/licenses/LICENSE-paranamer | 0 .../META-INF/licenses/LICENSE-slf4j-api | 0 .../xtable-hive-metastore-bundle/pom.xml | 79 +++++++++++++++++++ .../org/apache/xtable/hms/bundle/Main.java | 28 +++++++ .../src/main/resources/META-INF/LICENSE | 0 .../META-INF/licenses/LICENSE-antlr4-runtime | 0 .../META-INF/licenses/LICENSE-checker-qual | 0 .../licenses/LICENSE-glasshfish-javax-servlet | 0 .../licenses/LICENSE-javax-annotation-api | 0 .../META-INF/licenses/LICENSE-javolution | 0 .../META-INF/licenses/LICENSE-jersey-core | 0 .../META-INF/licenses/LICENSE-jruby-jcodings | 0 .../META-INF/licenses/LICENSE-jruby-joni | 0 .../META-INF/licenses/LICENSE-leveldbjni | 0 .../META-INF/licenses/LICENSE-paranamer | 0 .../META-INF/licenses/LICENSE-slf4j-api | 0 pom.xml | 4 + xtable-aws/pom.xml | 38 --------- xtable-hive-metastore/pom.xml | 37 --------- 26 files changed, 218 insertions(+), 75 deletions(-) create mode 100644 packaging/xtable-aws-bundle/pom.xml create mode 100644 packaging/xtable-aws-bundle/src/main/java/org/apache/xtable/aws/bundle/Main.java rename {xtable-aws => packaging/xtable-aws-bundle}/src/main/resources/META-INF/LICENSE (100%) rename {xtable-aws => packaging/xtable-aws-bundle}/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime (100%) rename {xtable-aws => packaging/xtable-aws-bundle}/src/main/resources/META-INF/licenses/LICENSE-checker-qual (100%) rename {xtable-aws => packaging/xtable-aws-bundle}/src/main/resources/META-INF/licenses/LICENSE-glassfish-java-servlet-jsp (100%) rename {xtable-aws => packaging/xtable-aws-bundle}/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api (100%) rename {xtable-aws => packaging/xtable-aws-bundle}/src/main/resources/META-INF/licenses/LICENSE-paranamer (100%) rename {xtable-aws => packaging/xtable-aws-bundle}/src/main/resources/META-INF/licenses/LICENSE-slf4j-api (100%) create mode 100644 packaging/xtable-hive-metastore-bundle/pom.xml create mode 100644 packaging/xtable-hive-metastore-bundle/src/main/java/org/apache/xtable/hms/bundle/Main.java rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/LICENSE (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-checker-qual (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-glasshfish-javax-servlet (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-javolution (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-jersey-core (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-jruby-jcodings (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-jruby-joni (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-leveldbjni (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-paranamer (100%) rename {xtable-hive-metastore => packaging/xtable-hive-metastore-bundle}/src/main/resources/META-INF/licenses/LICENSE-slf4j-api (100%) diff --git a/packaging/xtable-aws-bundle/pom.xml b/packaging/xtable-aws-bundle/pom.xml new file mode 100644 index 000000000..03be18e7c --- /dev/null +++ b/packaging/xtable-aws-bundle/pom.xml @@ -0,0 +1,79 @@ + + + + 4.0.0 + + org.apache.xtable + xtable + 0.2.0-SNAPSHOT + + + xtable-aws-bundle + XTable AWS Bundle + + + + org.apache.xtable + xtable-aws + ${project.version} + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + + + + + LICENSE + NOTICE + NOTICE.txt + + + + META-INF/LICENSE + target/classes/META-INF/LICENSE + + + META-INF/NOTICE + target/classes/META-INF/NOTICE + + + false + false + ${project.artifactId}-${project.version} + + + + + + + + diff --git a/packaging/xtable-aws-bundle/src/main/java/org/apache/xtable/aws/bundle/Main.java b/packaging/xtable-aws-bundle/src/main/java/org/apache/xtable/aws/bundle/Main.java new file mode 100644 index 000000000..d6ef22b44 --- /dev/null +++ b/packaging/xtable-aws-bundle/src/main/java/org/apache/xtable/aws/bundle/Main.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.xtable.aws.bundle; + +import org.apache.hudi.common.util.ReflectionUtils; + +public class Main { + + public static void main(String[] args) { + ReflectionUtils.getTopLevelClassesInClasspath(Main.class).forEach(System.out::println); + } +} diff --git a/xtable-aws/src/main/resources/META-INF/LICENSE b/packaging/xtable-aws-bundle/src/main/resources/META-INF/LICENSE similarity index 100% rename from xtable-aws/src/main/resources/META-INF/LICENSE rename to packaging/xtable-aws-bundle/src/main/resources/META-INF/LICENSE diff --git a/xtable-aws/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime b/packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime similarity index 100% rename from xtable-aws/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime rename to packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime diff --git a/xtable-aws/src/main/resources/META-INF/licenses/LICENSE-checker-qual b/packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-checker-qual similarity index 100% rename from xtable-aws/src/main/resources/META-INF/licenses/LICENSE-checker-qual rename to packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-checker-qual diff --git a/xtable-aws/src/main/resources/META-INF/licenses/LICENSE-glassfish-java-servlet-jsp b/packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-glassfish-java-servlet-jsp similarity index 100% rename from xtable-aws/src/main/resources/META-INF/licenses/LICENSE-glassfish-java-servlet-jsp rename to packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-glassfish-java-servlet-jsp diff --git a/xtable-aws/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api b/packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api similarity index 100% rename from xtable-aws/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api rename to packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api diff --git a/xtable-aws/src/main/resources/META-INF/licenses/LICENSE-paranamer b/packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-paranamer similarity index 100% rename from xtable-aws/src/main/resources/META-INF/licenses/LICENSE-paranamer rename to packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-paranamer diff --git a/xtable-aws/src/main/resources/META-INF/licenses/LICENSE-slf4j-api b/packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-slf4j-api similarity index 100% rename from xtable-aws/src/main/resources/META-INF/licenses/LICENSE-slf4j-api rename to packaging/xtable-aws-bundle/src/main/resources/META-INF/licenses/LICENSE-slf4j-api diff --git a/packaging/xtable-hive-metastore-bundle/pom.xml b/packaging/xtable-hive-metastore-bundle/pom.xml new file mode 100644 index 000000000..374fd56dc --- /dev/null +++ b/packaging/xtable-hive-metastore-bundle/pom.xml @@ -0,0 +1,79 @@ + + + + 4.0.0 + + org.apache.xtable + xtable + 0.2.0-SNAPSHOT + + + xtable-hive-metastore-bundle + XTable HMS Bundle + + + + org.apache.xtable + xtable-hive-metastore + ${project.version} + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + + + + + LICENSE + NOTICE + NOTICE.txt + + + + META-INF/LICENSE + target/classes/META-INF/LICENSE + + + META-INF/NOTICE + target/classes/META-INF/NOTICE + + + false + false + ${project.artifactId}-${project.version} + + + + + + + + diff --git a/packaging/xtable-hive-metastore-bundle/src/main/java/org/apache/xtable/hms/bundle/Main.java b/packaging/xtable-hive-metastore-bundle/src/main/java/org/apache/xtable/hms/bundle/Main.java new file mode 100644 index 000000000..fa62f6e62 --- /dev/null +++ b/packaging/xtable-hive-metastore-bundle/src/main/java/org/apache/xtable/hms/bundle/Main.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.xtable.hms.bundle; + +import org.apache.hudi.common.util.ReflectionUtils; + +public class Main { + + public static void main(String[] args) { + ReflectionUtils.getTopLevelClassesInClasspath(Main.class).forEach(System.out::println); + } +} diff --git a/xtable-hive-metastore/src/main/resources/META-INF/LICENSE b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/LICENSE similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/LICENSE rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/LICENSE diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-antlr4-runtime diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-checker-qual b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-checker-qual similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-checker-qual rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-checker-qual diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-glasshfish-javax-servlet b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-glasshfish-javax-servlet similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-glasshfish-javax-servlet rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-glasshfish-javax-servlet diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-javax-annotation-api diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-javolution b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-javolution similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-javolution rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-javolution diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-jersey-core b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-jersey-core similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-jersey-core rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-jersey-core diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-jruby-jcodings b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-jruby-jcodings similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-jruby-jcodings rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-jruby-jcodings diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-jruby-joni b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-jruby-joni similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-jruby-joni rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-jruby-joni diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-leveldbjni b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-leveldbjni similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-leveldbjni rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-leveldbjni diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-paranamer b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-paranamer similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-paranamer rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-paranamer diff --git a/xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-slf4j-api b/packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-slf4j-api similarity index 100% rename from xtable-hive-metastore/src/main/resources/META-INF/licenses/LICENSE-slf4j-api rename to packaging/xtable-hive-metastore-bundle/src/main/resources/META-INF/licenses/LICENSE-slf4j-api diff --git a/pom.xml b/pom.xml index 9c1b266f2..f1a0353dd 100644 --- a/pom.xml +++ b/pom.xml @@ -53,10 +53,14 @@ xtable-utilities xtable-aws xtable-hive-metastore + packaging/xtable-aws-bundle + packaging/xtable-hive-metastore-bundle 0.2.0-SNAPSHOT + + 2025-01-01T00:00:00Z 8 1.11.4 2.22.0 diff --git a/xtable-aws/pom.xml b/xtable-aws/pom.xml index 2c01ff8d7..6d928c368 100644 --- a/xtable-aws/pom.xml +++ b/xtable-aws/pom.xml @@ -94,42 +94,4 @@ test - - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - - - - - LICENSE - NOTICE - NOTICE.txt - - - - META-INF/LICENSE - target/classes/META-INF/LICENSE - - - META-INF/NOTICE - target/classes/META-INF/NOTICE - - - - - - - - - diff --git a/xtable-hive-metastore/pom.xml b/xtable-hive-metastore/pom.xml index c4a1e76af..aca2d81e6 100644 --- a/xtable-hive-metastore/pom.xml +++ b/xtable-hive-metastore/pom.xml @@ -187,41 +187,4 @@ - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - - - - - LICENSE - NOTICE - NOTICE.txt - - - - META-INF/LICENSE - target/classes/META-INF/LICENSE - - - META-INF/NOTICE - target/classes/META-INF/NOTICE - - - - - - - - - From 27d7e01bad5e2375e361fa84ecf45963420f5b50 Mon Sep 17 00:00:00 2001 From: Vinish Reddy Date: Wed, 16 Apr 2025 17:35:07 -0700 Subject: [PATCH 2/2] Add relative paths --- packaging/xtable-aws-bundle/pom.xml | 1 + packaging/xtable-hive-metastore-bundle/pom.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/packaging/xtable-aws-bundle/pom.xml b/packaging/xtable-aws-bundle/pom.xml index 03be18e7c..8c08515e6 100644 --- a/packaging/xtable-aws-bundle/pom.xml +++ b/packaging/xtable-aws-bundle/pom.xml @@ -23,6 +23,7 @@ org.apache.xtable xtable 0.2.0-SNAPSHOT + ../../pom.xml xtable-aws-bundle diff --git a/packaging/xtable-hive-metastore-bundle/pom.xml b/packaging/xtable-hive-metastore-bundle/pom.xml index 374fd56dc..392097b97 100644 --- a/packaging/xtable-hive-metastore-bundle/pom.xml +++ b/packaging/xtable-hive-metastore-bundle/pom.xml @@ -23,6 +23,7 @@ org.apache.xtable xtable 0.2.0-SNAPSHOT + ../../pom.xml xtable-hive-metastore-bundle