Skip to content

Commit 28198f8

Browse files
committed
Fixing shadowJar construction
1 parent 687c009 commit 28198f8

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ subprojects {
3232
}
3333
}
3434

35+
configurations.all {
36+
// Ensures that slf4j-api 1.x does not appear on the Flux classpath in particular, which can lead to this
37+
// issue - https://www.slf4j.org/codes.html#StaticLoggerBinder .
38+
resolutionStrategy {
39+
force "org.slf4j:slf4j-api:2.0.13"
40+
}
41+
}
42+
3543
test {
3644
useJUnitPlatform()
3745
finalizedBy jacocoTestReport

marklogic-spark-connector/build.gradle

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ configurations {
2323
testImplementation.extendsFrom(compileOnly)
2424
}
2525

26-
configurations.all {
27-
// Ensures that slf4j-api 1.x does not appear on the Flux classpath in particular, which can lead to this
28-
// issue - https://www.slf4j.org/codes.html#StaticLoggerBinder .
29-
resolutionStrategy {
30-
force "org.slf4j:slf4j-api:2.0.13"
31-
}
32-
}
33-
3426
dependencies {
3527
// Adding these forces code coverage data to be calculated for these subprojects.
3628
jacocoAggregation project(':marklogic-langchain4j')
@@ -68,9 +60,12 @@ dependencies {
6860
exclude group: "com.fasterxml.jackson.dataformat"
6961
}
7062

71-
// Allows us to test the langchain4j-specific features without including them in the connector by default.
72-
testImplementation project(":marklogic-langchain4j")
73-
testImplementation project(":marklogic-spark-langchain4j")
63+
// Once we update langchain4j to 0.36.0 or higher, which requires Java 17, this will need to become a
64+
// testImplementation dependency, and we'll figure out how to include them separately in Flux.
65+
shadowDependencies (project(":marklogic-spark-langchain4j")) {
66+
exclude group: "com.fasterxml.jackson.core"
67+
exclude group: "com.fasterxml.jackson.dataformat"
68+
}
7469

7570
// Supports testing the embedder feature.
7671
testImplementation "dev.langchain4j:langchain4j-embeddings-all-minilm-l6-v2:0.35.0"
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
dependencies {
22
implementation project(":marklogic-spark-api")
3-
implementation project(":marklogic-langchain4j")
3+
4+
implementation (project(":marklogic-langchain4j")) {
5+
// These need to be excluded here so they don't sneak in when this module is depended on by the
6+
// marklogic-spark-connector module.
7+
exclude group: "com.fasterxml.jackson.core"
8+
exclude group: "com.fasterxml.jackson.dataformat"
9+
}
410
}

0 commit comments

Comments
 (0)