File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,10 +38,25 @@ jobs:
3838 MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
3939 MAVEN_CENTRAL_PASSWORD : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
4040
41- - name : Generate and Deploy Thin JAR
41+ - name : Deploy Thin JAR (Simple approach)
4242 run : |
43- # Deploy thin JAR as a separate artifact to the same staging repository
44- ./release-thin-jar.sh
43+ # Get version from POM
44+ VERSION=$(grep -m1 '<version>' pom.xml | sed 's/.*<version>\(.*\)<\/version>.*/\1/')
45+ echo "Deploying thin JAR version: $VERSION"
46+
47+ # Update version in thin_public_pom.xml
48+ sed -i "s/<version>.*<\/version>/<version>$VERSION<\/version>/" thin_public_pom.xml
49+
50+ # Thin JAR already exists from main build - just deploy it with different POM
51+ mvn gpg:sign-and-deploy-file \
52+ -Dfile="target/databricks-jdbc-${VERSION}-thin.jar" \
53+ -DpomFile=thin_public_pom.xml \
54+ -DrepositoryId=central \
55+ -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
56+ -DgroupId=com.databricks \
57+ -DartifactId=databricks-jdbc-thin \
58+ -Dversion="$VERSION" \
59+ -Dpackaging=jar
4560 env :
4661 GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
4762 MAVEN_CENTRAL_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
Original file line number Diff line number Diff line change @@ -24,16 +24,39 @@ Add the following dependency to your `pom.xml`:
2424</dependency >
2525```
2626
27+ #### Thin JAR
28+
29+ For applications requiring explicit dependency management, use the thin JAR variant:
30+
31+ ``` xml
32+ <dependency >
33+ <groupId >com.databricks</groupId >
34+ <artifactId >databricks-jdbc-thin</artifactId >
35+ <version >1.0.9-oss</version >
36+ </dependency >
37+ ```
38+
39+ The thin JAR contains only the driver code and declares all dependencies in its POM, enabling dependency introspection and version management.
40+
2741### Build from Source
2842
29431 . Clone the repository
30442 . Run the following command:
3145 ``` bash
3246 mvn clean package
3347 ```
34- 3 . The jar file is generated as ` target/databricks-jdbc-<version>.jar `
48+ 3 . The following JAR files are generated:
49+ - ` target/databricks-jdbc-<version>.jar ` (standard JAR with bundled dependencies)
50+ - ` target/databricks-jdbc-<version>-thin.jar ` (thin JAR without dependencies)
35514 . The test coverage report is generated in ` target/site/jacoco/index.html `
3652
53+ To install the thin JAR locally with dependency metadata:
54+ ``` bash
55+ VERSION=$( grep -m1 ' <version>' pom.xml | sed ' s/.*<version>\(.*\)<\/version>.*/\1/' )
56+ sed -i " s/<version>.*<\/version>/<version>$VERSION <\/version>/" thin_public_pom.xml
57+ mvn install:install-file -Dfile=" target/databricks-jdbc-${VERSION} -thin.jar" -DpomFile=thin_public_pom.xml
58+ ```
59+
3760## Usage
3861
3962### Connection String
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments