Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions marklogic-spark-connector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ configurations {
}

dependencies {
// Need to compile against Spark, but its libraries are not part of the connector jar.
compileOnly "org.apache.spark:spark-sql_2.13:${sparkVersion}"

// This is compileOnly as Spark will provide its own copy at runtime.
compileOnly "com.fasterxml.jackson.core:jackson-databind:2.17.2"

shadowDependencies("com.marklogic:marklogic-client-api:7.2.0") {
// Need to use the versions of Jackson preferred by Spark.
exclude group: "com.fasterxml.jackson.core"
exclude group: "com.fasterxml.jackson.dataformat"
}

// This is compileOnly as Spark will provide its own copy at runtime.
compileOnly "com.fasterxml.jackson.core:jackson-databind:2.17.2"

// For logging.
shadowDependencies "org.slf4j:jcl-over-slf4j:2.0.17"

Expand Down Expand Up @@ -132,17 +133,6 @@ shadowJar {
// artifact that is published as a dependency. That is desirable as it includes the relocated packages listed below,
// which a dependent would otherwise have to manage themselves.
archiveClassifier.set("")

// Spark uses an older version of OkHttp; see
// https://stackoverflow.com/questions/61147800/how-to-override-spark-jars-while-running-spark-submit-command-in-cluster-mode
// for more information on why these are relocated.
relocate "okhttp3", "marklogicspark.okhttp3"
relocate "okio", "marklogicspark.okio"

// Shadowing these as well to avoid issues where a user needs to use the "normal" Java Client with the
// regular OkHttp classes.
relocate "com.marklogic.client", "marklogicspark.marklogic.client"
relocate "com.burgstaller.okhttp", "marklogicspark.com.burgstaller.okhttp"
}

// Publishing setup - see https://docs.gradle.org/current/userguide/publishing_setup.html .
Expand Down