Skip to content

Conversation

@gopalldb
Copy link
Owner

Summary

This PR simplifies the release process by publishing both shaded and thin JARs in a single unified workflow, replacing the multi-module approach with a cleaner single-module solution.

Changes

pom.xml

  • Added build-helper-maven-plugin to attach unshaded JAR with -thin classifier before shading
  • This creates databricks-jdbc-{version}-thin.jar automatically during build

.github/workflows/release.yml

  • Merged release and release-thin workflows into one
  • Publishes both artifacts to Maven Central in sequence:
    1. Shaded JAR: com.databricks:databricks-jdbc (main artifact)
    2. Thin JAR: com.databricks:databricks-jdbc-thin (with thin_public_pom.xml)

.github/workflows/release-thin.yml

  • Deleted (no longer needed - functionality merged into release.yml)

Benefits

Single workflow - Both JARs published in one GitHub Actions run
Minimal changes - Only 3 files modified, no code refactoring
Backward compatible - Existing users unaffected (shaded JAR remains main artifact)
Simple maintenance - Single module, no parent/child POM complexity
Clean build - mvn package creates both JARs automatically

Build Output

target/databricks-jdbc-3.0.1.jar       (37MB shaded uber JAR)
target/databricks-jdbc-3.0.1-thin.jar  (2.4MB thin JAR, driver classes only)

Testing

  • ✅ Local build successful
  • ✅ Both JARs created with correct content
  • ✅ Thin JAR verified: contains driver classes, no shaded dependencies

Replaces

This is a simpler alternative to PR databricks#1042 (multi-module approach), providing the same functionality with less complexity.

NO_CHANGELOG=true - Infrastructure change, no user-facing functionality changes

- Add build-helper-maven-plugin to attach unshaded JAR with -thin classifier
- Merge release.yml and release-thin.yml into single workflow
- Publish both artifacts to Maven Central in one workflow
- Shaded JAR: com.databricks:databricks-jdbc (main artifact)
- Thin JAR: com.databricks:databricks-jdbc-thin (separate artifact with thin_public_pom.xml)

Signed-off-by: Gopal Lal <[email protected]>
The thin JAR is now published in the main release.yml workflow
along with the shaded JAR, eliminating the need for a separate
workflow.

Signed-off-by: Gopal Lal <[email protected]>
The jacoco:report goal is bound to the prepare-package phase in pom.xml.
Running 'mvn clean test jacoco:report' stops after test phase and never
reaches prepare-package, causing the coverage file to not be generated.

Changed to 'mvn clean package' which runs through prepare-package phase
and generates the coverage report at target/site/jacoco/jacoco.xml.

Tested locally:
- Coverage file generated successfully
- Coverage: 85.23% (passes 85% requirement)
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