Skip to content

Commit

Permalink
Change Jackson dependency to get version from core to avoid jar hell (#…
Browse files Browse the repository at this point in the history
…997)

* Change Jackson dependency to get version from core to avoid jar hell

Signed-off-by: Daniel Widdis <[email protected]>

* Remove unneded line

Signed-off-by: Daniel Widdis <[email protected]>

---------

Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis authored Jan 17, 2025
1 parent 33579a3 commit 84ae902
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import java.nio.file.Files
import org.opensearch.gradle.testclusters.OpenSearchCluster
import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask
import org.opensearch.gradle.test.RestIntegTestTask
import org.opensearch.gradle.VersionProperties
import java.util.concurrent.Callable
import java.nio.file.Paths

Expand Down Expand Up @@ -35,9 +36,7 @@ buildscript {

isSameMajorVersion = opensearch_version.split("\\.")[0] == bwcVersionShort.split("\\.")[0]
swaggerVersion = "2.1.24"
jacksonVersion = "2.18.1"
swaggerCoreVersion = "2.2.28"

}

repositories {
Expand Down Expand Up @@ -189,16 +188,10 @@ dependencies {
implementation "io.swagger.parser.v3:swagger-parser-core:${swaggerVersion}"
implementation "io.swagger.parser.v3:swagger-parser:${swaggerVersion}"
implementation "io.swagger.parser.v3:swagger-parser-v3:${swaggerVersion}"
// Declare and force Jackson dependencies for tests
testImplementation("com.fasterxml.jackson.core:jackson-databind") {
version { strictly("${jacksonVersion}") }
}
testImplementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310") {
version { strictly("${jacksonVersion}") }
}
testImplementation("com.fasterxml.jackson.core:jackson-annotations") {
version { strictly("${jacksonVersion}") }
}
// Declare Jackson dependencies for tests (from OpenSearch version catalog)
testImplementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
testImplementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}"
testImplementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${versions.jackson_databind}"

// ZipArchive dependencies used for integration tests
zipArchive group: 'org.opensearch.plugin', name:'opensearch-ml-plugin', version: "${opensearch_build}"
Expand All @@ -209,7 +202,6 @@ dependencies {
configurations.all {
resolutionStrategy {
force("com.google.guava:guava:33.4.0-jre") // CVE for 31.1, keep to force transitive dependencies
force("com.fasterxml.jackson.core:jackson-core:${jacksonVersion}") // Dependency Jar Hell
force("org.apache.httpcomponents.core5:httpcore5:5.3.2") // Dependency Jar Hell
}
}
Expand Down

0 comments on commit 84ae902

Please sign in to comment.