Skip to content

Commit

Permalink
Resolving apache commons dependency forcefully to make sure that ther…
Browse files Browse the repository at this point in the history
…e is no jarhell

Signed-off-by: Navneet Verma <[email protected]>
  • Loading branch information
navneet1v committed Sep 6, 2023
1 parent f382d8e commit 4e50a8c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ dependencies {
zipArchive group: 'org.opensearch.plugin', name:'opensearch-ml-plugin', version: "${opensearch_build}"
compileOnly fileTree(dir: knnJarDirectory, include: '*.jar')
api group: 'org.opensearch', name:'opensearch-ml-client', version: "${opensearch_build}"
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
compileOnly group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
// ml-common excluded reflection for runtime so we need to add it by ourselves.
// https://github.com/opensearch-project/ml-commons/commit/464bfe34c66d7a729a00dd457f03587ea4e504d9
// TODO: Remove following three lines of dependencies if ml-common include them in their jar
Expand All @@ -153,6 +153,12 @@ dependencies {
runtimeOnly group: 'org.opensearch', name: 'common-utils', version: "${opensearch_build}"
}

// Resolving apache commons dependency forcefully to make sure that there is no jarhell and multiple dependency coming
// for apache commons lang3
configurations.all {
resolutionStrategy.force 'org.apache.commons:commons-lang3:3.10'
}

// In order to add the jar to the classpath, we need to unzip the
// k-NN zip and then copy it into a directory that we specify as a dependency.
task extractKnnJar(type: Copy) {
Expand Down

0 comments on commit 4e50a8c

Please sign in to comment.