Skip to content

[PECOBLR-747] Thin jar#987

Merged
shivam2680 merged 10 commits into
mainfrom
thin-jar
Sep 11, 2025
Merged

[PECOBLR-747] Thin jar#987
shivam2680 merged 10 commits into
mainfrom
thin-jar

Conversation

@shivam2680
Copy link
Copy Markdown
Collaborator

@shivam2680 shivam2680 commented Sep 9, 2025

Description

Customer reported that the Databricks thin JAR "specifies no dependencies at all" in its POM, preventing dependency introspection tools from working. Users cannot:

  • View dependency trees with mvn dependency:tree or Clojure's -Stree
  • Pin, override, or exclude specific dependency versions
  • Resolve dependency conflicts using standard build tools

Solution:
Deploy the existing thin JAR as a separate artifact (databricks-jdbc-thin) with a POM that declares all runtime dependencies:

  1. Created thin_public_pom.xml: Declares runtime dependencies (Arrow, BouncyCastle, Jackson, Thrift, etc.) with explicit versions. exclude provide and test scope deps.
  2. Updated release workflow: Deploy thin JAR using mvn deploy-file with dependency metadata
  3. Updated README.md: Added thin JAR usage instructions
  • Enables introspection: clj -Sdeps '{:deps {com.databricks/databricks-jdbc-thin {:mvn/version "1.0.9-oss"}}}' -Stree now works
  • Separate artifact: com.databricks:databricks-jdbc-thin vs com.databricks:databricks-jdbc
  • Standard dependency management: Users can exclude/override versions using Maven/Gradle
  • No build changes: Uses existing thin JAR (2.5MB), just adds deployment metadata

Testing

  • mvn validate -f thin_public_pom.xml - POM structure is valid
  • Existing thin JAR builds correctly: target/databricks-jdbc-*-thin.jar (2.5MB)

Additional Notes to the Reviewer

@shivam2680 shivam2680 self-assigned this Sep 9, 2025
@shivam2680 shivam2680 marked this pull request as ready for review September 9, 2025 19:35
Comment thread README.md Outdated
<dependency>
<groupId>com.databricks</groupId>
<artifactId>databricks-jdbc-thin</artifactId>
<version>1.0.9-oss</version>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This won't be present in this version, can we add a comment on this? (Customer might get confused by this )

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added comment that it will be available after 1.10.0 release

Comment on lines +39 to 54
- name: Publish Thin JAR as Separate Artifact
run: |
# Sign and deploy thin JAR with full dependency metadata
# Uses GPG signing to ensure artifact integrity
VERSION=$(grep -m1 '<version>' pom.xml | sed 's/.*<version>\(.*\)<\/version>.*/\1/')
mvn -Prelease gpg:sign-and-deploy-file \
-Dfile="target/databricks-jdbc-${VERSION}-thin.jar" \
-DpomFile=thin_public_pom.xml \
-DrepositoryId=central \
-DgroupId=com.databricks \
-DartifactId=databricks-jdbc-thin \
-Dversion="${VERSION}" \
-Dpackaging=jar \
-DgeneratePom=false \
-Dgpg.passphrase="${GPG_PASSPHRASE}"
env:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is not required, this is already taken care in the below patch where we say :

 files: target/*.jar

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this is for github release artifacts and not maven release artifacts

@samikshya-db samikshya-db changed the title Thin jar [PECOBLR-747] Thin jar Sep 10, 2025
Copy link
Copy Markdown
Collaborator

@samikshya-db samikshya-db left a comment

Choose a reason for hiding this comment

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

I have some comments, please merge after that. Thanks for making the changes 🫙

@shivam2680 shivam2680 enabled auto-merge (squash) September 11, 2025 10:26
@shivam2680 shivam2680 merged commit 4c9aaab into main Sep 11, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants