Unified release workflow for shaded and thin JARs#1
Open
Conversation
- 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 <gopal.lal@databricks.com>
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 <gopal.lal@databricks.com>
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
build-helper-maven-pluginto attach unshaded JAR with-thinclassifier before shadingdatabricks-jdbc-{version}-thin.jarautomatically during build.github/workflows/release.yml
com.databricks:databricks-jdbc(main artifact)com.databricks:databricks-jdbc-thin(with thin_public_pom.xml).github/workflows/release-thin.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 packagecreates both JARs automaticallyBuild Output
Testing
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