@@ -16,17 +16,18 @@ configurations {
1616}
1717
1818dependencies {
19+ // Need to compile against Spark, but its libraries are not part of the connector jar.
1920 compileOnly " org.apache.spark:spark-sql_2.13:${ sparkVersion} "
2021
22+ // This is compileOnly as Spark will provide its own copy at runtime.
23+ compileOnly " com.fasterxml.jackson.core:jackson-databind:2.17.2"
24+
2125 shadowDependencies(" com.marklogic:marklogic-client-api:7.2.0" ) {
2226 // Need to use the versions of Jackson preferred by Spark.
2327 exclude group : " com.fasterxml.jackson.core"
2428 exclude group : " com.fasterxml.jackson.dataformat"
2529 }
2630
27- // This is compileOnly as Spark will provide its own copy at runtime.
28- compileOnly " com.fasterxml.jackson.core:jackson-databind:2.17.2"
29-
3031 // For logging.
3132 shadowDependencies " org.slf4j:jcl-over-slf4j:2.0.17"
3233
@@ -132,17 +133,6 @@ shadowJar {
132133 // artifact that is published as a dependency. That is desirable as it includes the relocated packages listed below,
133134 // which a dependent would otherwise have to manage themselves.
134135 archiveClassifier. set(" " )
135-
136- // Spark uses an older version of OkHttp; see
137- // https://stackoverflow.com/questions/61147800/how-to-override-spark-jars-while-running-spark-submit-command-in-cluster-mode
138- // for more information on why these are relocated.
139- relocate " okhttp3" , " marklogicspark.okhttp3"
140- relocate " okio" , " marklogicspark.okio"
141-
142- // Shadowing these as well to avoid issues where a user needs to use the "normal" Java Client with the
143- // regular OkHttp classes.
144- relocate " com.marklogic.client" , " marklogicspark.marklogic.client"
145- relocate " com.burgstaller.okhttp" , " marklogicspark.com.burgstaller.okhttp"
146136}
147137
148138// Publishing setup - see https://docs.gradle.org/current/userguide/publishing_setup.html .
0 commit comments