@@ -66,15 +66,14 @@ dependencies {
66
66
exclude module : " logback-classic"
67
67
}
68
68
69
- // 1.2.1 will be published soon, and then we'll switch to that
70
- testImplementation ' com.marklogic:marklogic-junit5:1.2.1'
69
+ testImplementation ' com.marklogic:marklogic-junit5:1.3.0'
71
70
72
71
testImplementation " org.apache.kafka:connect-api:${ kafkaVersion} "
73
72
testImplementation " org.apache.kafka:connect-json:${ kafkaVersion} "
74
73
testImplementation ' net.mguenther.kafka:kafka-junit:3.2.2'
75
74
76
75
// Forcing logback to be used for test logging
77
- testImplementation " ch.qos.logback:logback-classic:1.2.11 "
76
+ testImplementation " ch.qos.logback:logback-classic:1.3.5 "
78
77
testImplementation " org.slf4j:jcl-over-slf4j:1.7.36"
79
78
80
79
documentation files(' LICENSE.txt' )
@@ -184,7 +183,17 @@ task connectorArchive_CopyDocumentationToBuildDirectory(type: Copy, group: confl
184
183
task connectorArchive_CopyDependenciesToBuildDirectory (type : Copy , group : confluentArchiveGroup, dependsOn : jar) {
185
184
description = " Copy the dependency jars into the lib folder"
186
185
from jar
187
- from configurations. runtimeClasspath. findAll { it. name. endsWith(' jar' ) }
186
+ // Confluent already includes the Jackson dependencies that this connector depends on. If the connector includes any
187
+ // itself, and the DHF integration is used with the sink connector, then the following error will occur when DHF
188
+ // tries to connect to the Manage API of MarkLogic:
189
+ // java.lang.ClassCastException: com.fasterxml.jackson.datatype.jdk8.Jdk8Module cannot be cast to com.fasterxml.jackson.databind.Module
190
+ // at org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.registerWellKnownModulesIfAvailable(Jackson2ObjectMapperBuilder.java:849)
191
+ // stackoverflow indicates this may be due to multiple copies of Jackson being on the classpath, as Jdk8Module
192
+ // otherwise should be castable to Module.
193
+ // Testing has verified that excluding all "jackson-" jars still results in the connector working properly with
194
+ // Confluent 7.3.1. This has no impact on using the connector with plain Apache Kafka which does not rely on
195
+ // constructing this connector archive.
196
+ from configurations. runtimeClasspath. findAll { it. name. endsWith(' jar' ) && ! it. name. startsWith(" jackson-" )}
188
197
into " ${ baseArchiveBuildDir} /${ baseArchiveName} /lib"
189
198
}
190
199
0 commit comments