From 8d711481f7eb5809d93d66dee795f19fac82be8b Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 16:14:39 -0700 Subject: [PATCH] Fix Failing build due to slf4j from k-NN (#634) (#635) Signed-off-by: Naveen Tatikonda (cherry picked from commit 759a971404c31dd302527b0c3f00ce347a12c48c) Co-authored-by: Naveen Tatikonda --- build.gradle | 8 +++++--- qa/build.gradle | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index df4527b9d..305e19f39 100644 --- a/build.gradle +++ b/build.gradle @@ -250,7 +250,9 @@ dependencies { zipArchive group: 'org.opensearch.plugin', name:'opensearch-knn', version: "${opensearch_build}" zipArchive group: 'org.opensearch.plugin', name:'opensearch-ml-plugin', version: "${opensearch_build}" secureIntegTestPluginArchive group: 'org.opensearch.plugin', name:'opensearch-security', version: "${opensearch_build}" - compileOnly fileTree(dir: knnJarDirectory, include: '*.jar') + compileOnly fileTree(dir: knnJarDirectory, include: "opensearch-knn-${opensearch_build}.jar") + compileOnly group: 'com.google.guava', name: 'guava', version:'32.1.3-jre' + compileOnly group: 'commons-lang', name: 'commons-lang', version: '2.6' api group: 'org.opensearch', name:'opensearch-ml-client', version: "${opensearch_build}" testFixturesImplementation "org.opensearch.test:framework:${opensearch_version}" implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0' @@ -265,8 +267,8 @@ dependencies { runtimeOnly group: 'org.json', name: 'json', version: '20231013' testFixturesImplementation "org.opensearch:common-utils:${version}" testFixturesImplementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0' - testFixturesCompileOnly group: 'com.google.guava', name: 'guava', version:'32.0.1-jre' - testFixturesCompileOnly fileTree(dir: knnJarDirectory, include: '*.jar') + testFixturesCompileOnly group: 'com.google.guava', name: 'guava', version:'32.1.3-jre' + testFixturesCompileOnly fileTree(dir: knnJarDirectory, include: "opensearch-knn-${opensearch_build}.jar") } // In order to add the jar to the classpath, we need to unzip the diff --git a/qa/build.gradle b/qa/build.gradle index 511dcc442..6b7667e62 100644 --- a/qa/build.gradle +++ b/qa/build.gradle @@ -31,7 +31,9 @@ dependencies { api "org.opensearch:opensearch:${opensearch_version}" zipArchive group: 'org.opensearch.plugin', name:'opensearch-knn', version: "${opensearch_build}" zipArchive group: 'org.opensearch.plugin', name:'opensearch-ml-plugin', version: "${opensearch_build}" - compileOnly fileTree(dir: knnJarDirectory, include: '*.jar') + compileOnly fileTree(dir: knnJarDirectory, include: "opensearch-knn-${opensearch_build}.jar") + compileOnly group: 'com.google.guava', name: 'guava', version:'32.1.3-jre' + compileOnly group: 'commons-lang', name: 'commons-lang', version: '2.6' api "org.apache.logging.log4j:log4j-api:${versions.log4j}" api "org.apache.logging.log4j:log4j-core:${versions.log4j}" api "junit:junit:${versions.junit}"