@@ -39,6 +39,7 @@ repositories {
39
39
configurations {
40
40
// see https://docs.gradle.org/4.1/userguide/dependency_management.html#sub:exclude_transitive_dependencies
41
41
runtimeClasspath. exclude group : ' org.slf4j' , module : ' slf4j-api'
42
+ embeddedJar
42
43
}
43
44
44
45
sourceSets {
55
56
}
56
57
57
58
dependencies {
59
+ embeddedJar ' com.databricks:databricks-jdbc:0.9.8-oss'
60
+
58
61
compileOnly " io.nextflow:nextflow:$nextflowVersion "
59
62
compileOnly ' org.slf4j:slf4j-api:2.0.7'
60
63
compileOnly ' org.pf4j:pf4j:3.12.0'
@@ -66,8 +69,8 @@ dependencies {
66
69
api ' org.postgresql:postgresql:42.7.4'
67
70
api ' org.xerial:sqlite-jdbc:3.47.0.0'
68
71
api ' org.duckdb:duckdb_jdbc:0.10.2'
69
- api(' com.databricks:databricks-jdbc:0.9.8-oss' ) { exclude group : ' commons-logging' }
70
72
73
+ api files(" $buildDir /filteredJars/databricks-jdbc-filtered-0.9.8-oss.jar" )
71
74
72
75
// JDBC driver setup for AWS Athena - the 3rd party JAR are being downloaded and setup as gradle tasks below.
73
76
// Reference https://docs.aws.amazon.com/athena/latest/ug/connect-with-jdbc.html
@@ -129,5 +132,20 @@ task copyAthenDep(dependsOn: unzipAthenDep, type: Copy) {
129
132
from file(new File (buildDir, ' /downloads/unzip/awsathena/SimbaAthenaJDBC-2.0.25.1001/AthenaJDBC42_2.0.25.1001.jar' ))
130
133
into " src/dist/lib"
131
134
}
135
+
136
+ // Task to create a filtered JAR
137
+ task filteredJar (type : Jar ) {
138
+ from {
139
+ zipTree(configurations. embeddedJar. singleFile). matching {
140
+ exclude ' org/slf4j/**' // Exclude SLF4J classes
141
+ }
142
+ }
143
+ archiveBaseName. set(" databricks-jdbc-filtered" )
144
+ archiveVersion. set(" 0.9.8-oss" )
145
+ destinationDirectory. set(file(" $buildDir /filteredJars" ))
146
+ }
147
+
132
148
project. copyPluginLibs. dependsOn(' copyAthenDep' )
133
149
project. compileGroovy. dependsOn(' copyAthenDep' )
150
+ project. compileGroovy. dependsOn(' filteredJar' )
151
+ project. copyPluginLibs. dependsOn(' filteredJar' )
0 commit comments