diff --git a/build.gradle b/build.gradle index 90b1ca1f1..7728763f3 100644 --- a/build.gradle +++ b/build.gradle @@ -250,6 +250,7 @@ def knnJarDirectory = "$buildDir/dependencies/opensearch-knn" dependencies { api "org.opensearch:opensearch:${opensearch_version}" + zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}" 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}" @@ -268,6 +269,12 @@ dependencies { runtimeOnly group: 'org.apache.commons', name: 'commons-text', version: '1.10.0' runtimeOnly group: 'com.google.code.gson', name: 'gson', version: '2.10.1' runtimeOnly group: 'org.json', name: 'json', version: '20231013' + // json-path 2.9.0 depends on slf4j 2.0.11, which conflicts with the version used by OpenSearch core. + // Excluding slf4j here since json-path is only used for testing, and logging failures in this context are acceptable. + runtimeOnly('com.jayway.jsonpath:json-path:2.9.0') { + // OpenSearch core is using slf4j 1.7.36. Therefore, we cannot change the version here. + exclude group: 'org.slf4j', module: 'slf4j-api' + } runtimeOnly("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}") runtimeOnly("com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}") testFixturesImplementation "org.opensearch:common-utils:${version}" diff --git a/qa/build.gradle b/qa/build.gradle index 62d95ea49..9fe066664 100644 --- a/qa/build.gradle +++ b/qa/build.gradle @@ -34,11 +34,18 @@ def knnJarDirectory = "$rootDir/build/dependencies/opensearch-knn" dependencies { api "org.opensearch:opensearch:${opensearch_version}" + zipArchive group: 'org.opensearch.plugin', name:'opensearch-job-scheduler', version: "${opensearch_build}" 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: "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' + // json-path 2.9.0 depends on slf4j 2.0.11, which conflicts with the version used by OpenSearch core. + // Excluding slf4j here since json-path is only used for testing, and logging failures in this context are acceptable. + testRuntimeOnly('com.jayway.jsonpath:json-path:2.9.0') { + // OpenSearch core is using slf4j 1.7.36. Therefore, we cannot change the version here. + exclude group: 'org.slf4j', module: 'slf4j-api' + } api "org.apache.logging.log4j:log4j-api:${versions.log4j}" api "org.apache.logging.log4j:log4j-core:${versions.log4j}" api "junit:junit:${versions.junit}" @@ -70,6 +77,16 @@ if (Os.isFamily(Os.FAMILY_WINDOWS)) { ext{ plugins = [provider(new Callable(){ + @Override + RegularFile call() throws Exception { + return new RegularFile() { + @Override + File getAsFile() { + return configurations.zipArchive.asFileTree.matching{include "**/opensearch-job-scheduler-${opensearch_build}.zip"}.getSingleFile() + } + } + } + }), provider(new Callable(){ @Override RegularFile call() throws Exception { return new RegularFile() {