This is an automated email from the ASF dual-hosted git repository.

abstractdog pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new f0464568498 HIVE-29756: maven shade plugin fixed to make 
beeline-standalone.jar (#6626)
f0464568498 is described below

commit f0464568498d727ce326a7b8502c1017b1c484bd
Author: illiabarbashov-sketch <[email protected]>
AuthorDate: Mon Jul 27 17:19:51 2026 +0200

    HIVE-29756: maven shade plugin fixed to make beeline-standalone.jar (#6626)
---
 beeline/pom.xml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 57 insertions(+), 4 deletions(-)

diff --git a/beeline/pom.xml b/beeline/pom.xml
index 2198bd72e61..4806fb7ede5 100644
--- a/beeline/pom.xml
+++ b/beeline/pom.xml
@@ -66,6 +66,22 @@
       <artifactId>hive-standalone-metastore-server</artifactId>
       <version>${standalone-metastore.version}</version>
     </dependency>
+    <dependency>
+      <!--
+      Since the compile-time hive-jdbc dependency contains Utils.java,
+      which directly imports HiveSQLException from hive-service,
+      hive-service is also required at runtime and should therefore be 
declared as a compile-time dependency.
+      -->
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-service</artifactId>
+      <version>${project.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
     <!-- inter-project -->
     <dependency>
       <groupId>commons-cli</groupId>
@@ -128,6 +144,22 @@
       <artifactId>log4j-slf4j-impl</artifactId>
     </dependency>
     <!-- test intra-project -->
+    <!--
+    hive-exec, hive-llap-server, and hive-hplsql are declared test scope here 
so that
+    are all needed to run BeelineCli test to manage the embedded HS2 session.
+    -->
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-exec</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
     <dependency>
       <groupId>org.apache.hive</groupId>
       <artifactId>hive-exec</artifactId>
@@ -143,13 +175,25 @@
     </dependency>
     <dependency>
       <groupId>org.apache.hive</groupId>
-      <artifactId>hive-service</artifactId>
+      <artifactId>hive-llap-server</artifactId>
       <version>${project.version}</version>
       <scope>test</scope>
       <exclusions>
         <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hive</groupId>
+      <artifactId>hive-hplsql</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
         </exclusion>
       </exclusions>
     </dependency>
@@ -244,12 +288,21 @@
             </goals>
             <configuration>
               <createDependencyReducedPom>false</createDependencyReducedPom>
-              <finalName>jar-with-dependencies</finalName>
+              <finalName>beeline-standalone</finalName>
               <transformers>
                 <transformer 
implementation="com.github.edwgiz.mavenShadePlugin.log4j2CacheTransformer.PluginsCacheFileTransformer"/>
                 <transformer 
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                   <mainClass>org.apache.hive.beeline.BeeLine</mainClass>
+                  <manifestEntries>
+                    <Multi-Release>true</Multi-Release>
+                  </manifestEntries>
                 </transformer>
+                <!--
+                  Without this, the META-INF/services/java.sql.Driver service 
file ends up with only one implementation of the
+                  interface (the last writer wins) and HiveDriver is never 
registered, causing:
+                    "No known driver to handle jdbc:hive2://..."
+                -->
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
               </transformers>
               <filters>
                 <filter>

Reply via email to