Skip to content

HIVE-29756: maven shade plugin fixed to make beeline-standalone.jar#6626

Open
illiabarbashov-sketch wants to merge 7 commits into
apache:masterfrom
illiabarbashov-sketch:HIVE-29756
Open

HIVE-29756: maven shade plugin fixed to make beeline-standalone.jar#6626
illiabarbashov-sketch wants to merge 7 commits into
apache:masterfrom
illiabarbashov-sketch:HIVE-29756

Conversation

@illiabarbashov-sketch

@illiabarbashov-sketch illiabarbashov-sketch commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  1. The beeline pom/xml was missing Multi-Release: true.
    dnsjava is a Multi-Release JAR. Its DnsjavaInetAddressResolverProvider class lives at META-INF/versions/18/org/xbill/DNS/spi/DnsjavaInetAddressResolverProvider.class (Java 18+ only) which caused
    Class not found exception for jdk18+ without multi-release
  2. hive-service is declared as compile scope in beeline/pom.xml now, Since hive-jdbc's Utils.java directly imports HiveSQLException from hive-service, so it's needed at runtime.
  3. hive-exec dependency along with hive-llap-server and hive-hplsql were added to the test scope of the beeline module.
  4. ServicesResourceTransformer added to shade configuration, to merge all the implementations of java.sql.Driver
    Otherwise only one implementation could be present in the final jar. (No hive driver exception fix)

Why are the changes needed?

  1. To distribute beeline as a standalone jar without any additional dependencies.
  2. Since hive-service was in the test scope, it didn't exclude any transitive dependencies and beeline tests relied on packages that weren't in the pom.xml. After we moved hive-service into compile scope we had to exclude all the transitive dependencies to keep the standalone jar lean. But the test scope changed and it was needed to declare all the test dependencies for beeline explicitly to make beeline cli tests run.

Does this PR introduce any user-facing change?

  1. No

How was this patch tested?

  1. No tests were added, as it's a build configuration change

@abstractdog abstractdog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good mostly, only minor comments

Comment thread beeline/pom.xml
Comment thread beeline/pom.xml
Comment thread beeline/pom.xml Outdated
</manifestEntries>
</transformer>
<!--
Without this, the java.sql.Driver service file ends up containing only one implementation of the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for readers' convenience, "the java.sql.Driver service file" can become "META-INF/services/java.sql.Driver file"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@abstractdog abstractdog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants