diff --git a/build.gradle b/build.gradle index b11617d981fcd..8d09879ca4842 100644 --- a/build.gradle +++ b/build.gradle @@ -45,6 +45,7 @@ import org.gradle.plugins.ide.eclipse.model.AccessRule import org.gradle.plugins.ide.eclipse.model.EclipseJdt import org.gradle.plugins.ide.eclipse.model.SourceFolder import org.gradle.api.Project; +import org.gradle.api.internal.tasks.testing.junit.JUnitTestFramework import org.gradle.process.ExecResult; import org.gradle.util.DistributionLocator import org.gradle.util.GradleVersion @@ -55,8 +56,8 @@ plugins { id 'lifecycle-base' id 'opensearch.docker-support' id 'opensearch.global-build-info' - id "com.diffplug.spotless" version "6.4.2" apply false - id "org.gradle.test-retry" version "1.4.1" apply false + id "com.diffplug.spotless" version "6.11.0" apply false + id "org.gradle.test-retry" version "1.5.1" apply false id "test-report-aggregation" id 'jacoco-report-aggregation' } @@ -77,6 +78,19 @@ allprojects { group = 'org.opensearch' version = VersionProperties.getOpenSearch() description = "OpenSearch subproject ${project.path}" + + afterEvaluate { + project.tasks.withType(Test) { task -> + // This is so hacky: now, by default, test tasks uses JUnit framework and always includes 'junit' + // JARs from the Gradle distribution (no ways to override this behavior). It causes JAR hell on test + // classpath, example of the report: + // + // jar1: /home/ubuntu/.gradle/caches/modules-2/files-2.1/junit/junit/4.13.2/8ac9e16d933b6fb43bc7f576336b8f4d7eb5ba12/junit-4.13.2.jar + // jar2: /home/ubuntu/.gradle/wrapper/dists/gradle-8.0-rc-1-all/2p8rgxxewg8l61n1p3vrzr9s8/gradle-8.0-rc-1/lib/junit-4.13.2.jar + // + task.getTestFrameworkProperty().convention(getProviderFactory().provider(() -> new JUnitTestFramework(task, task.getFilter(), false))); + } + } } configure(allprojects - project(':distribution:archives:integ-test-zip')) { diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index bb84462e2de44..aeeaf90f51c61 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -105,7 +105,7 @@ dependencies { api 'commons-codec:commons-codec:1.15' api 'org.apache.commons:commons-compress:1.22' api 'org.apache.ant:ant:1.10.13' - api 'com.netflix.nebula:gradle-extra-configurations-plugin:8.0.0' + api 'com.netflix.nebula:gradle-extra-configurations-plugin:9.0.0' api 'com.netflix.nebula:nebula-publishing-plugin:19.2.0' api 'com.netflix.nebula:gradle-info-plugin:12.0.0' api 'org.apache.rat:apache-rat:0.15' diff --git a/buildSrc/src/main/java/org/opensearch/gradle/testclusters/StandaloneRestIntegTestTask.java b/buildSrc/src/main/java/org/opensearch/gradle/testclusters/StandaloneRestIntegTestTask.java index abf5f3c1db198..abc92c10285ee 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/testclusters/StandaloneRestIntegTestTask.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/testclusters/StandaloneRestIntegTestTask.java @@ -39,6 +39,7 @@ import org.gradle.api.Task; import org.gradle.api.provider.Provider; import org.gradle.api.services.internal.BuildServiceRegistryInternal; +import org.gradle.api.services.internal.BuildServiceProvider; import org.gradle.api.tasks.CacheableTask; import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.Nested; @@ -123,7 +124,7 @@ public List getSharedResources() { serviceRegistry, TestClustersPlugin.THROTTLE_SERVICE_NAME ); - SharedResource resource = serviceRegistry.forService(throttleProvider); + final SharedResource resource = getSharedResource(serviceRegistry, throttleProvider); int nodeCount = clusters.stream().mapToInt(cluster -> cluster.getNodes().size()).sum(); if (nodeCount > 0) { @@ -133,6 +134,37 @@ public List getSharedResources() { return Collections.unmodifiableList(locks); } + private SharedResource getSharedResource( + BuildServiceRegistryInternal serviceRegistry, + Provider throttleProvider + ) { + try { + try { + // The forService(Provider) is used by Gradle pre-8.0 + return (SharedResource) MethodHandles.publicLookup() + .findVirtual( + BuildServiceRegistryInternal.class, + "forService", + MethodType.methodType(SharedResource.class, Provider.class) + ) + .bindTo(serviceRegistry) + .invokeExact(throttleProvider); + } catch (NoSuchMethodException | IllegalAccessException ex) { + // The forService(BuildServiceProvider) is used by Gradle post-8.0 + return (SharedResource) MethodHandles.publicLookup() + .findVirtual( + BuildServiceRegistryInternal.class, + "forService", + MethodType.methodType(SharedResource.class, BuildServiceProvider.class) + ) + .bindTo(serviceRegistry) + .invokeExact((BuildServiceProvider) throttleProvider); + } + } catch (Throwable ex) { + throw new IllegalStateException("Unable to find suitable BuildServiceRegistryInternal::forService", ex); + } + } + private ResourceLock getResourceLock(SharedResource resource, int nUsages) { try { try { diff --git a/buildSrc/src/test/java/org/opensearch/gradle/JdkDownloadPluginTests.java b/buildSrc/src/test/java/org/opensearch/gradle/JdkDownloadPluginTests.java index 4d324c1cf8b55..55a1eaec98d82 100644 --- a/buildSrc/src/test/java/org/opensearch/gradle/JdkDownloadPluginTests.java +++ b/buildSrc/src/test/java/org/opensearch/gradle/JdkDownloadPluginTests.java @@ -33,6 +33,9 @@ package org.opensearch.gradle; import org.opensearch.gradle.test.GradleUnitTestCase; + +import java.util.UUID; + import org.gradle.api.NamedDomainObjectContainer; import org.gradle.api.Project; import org.gradle.testfixtures.ProjectBuilder; @@ -148,7 +151,8 @@ private void createJdk(Project project, String name, String vendor, String versi } private Project createProject() { - Project project = ProjectBuilder.builder().withParent(rootProject).build(); + final String name = UUID.randomUUID().toString(); + Project project = ProjectBuilder.builder().withName(name).withParent(rootProject).build(); project.getPlugins().apply("opensearch.jdk-download"); return project; } diff --git a/buildSrc/src/test/java/org/opensearch/gradle/precommit/DependencyLicensesTaskTests.java b/buildSrc/src/test/java/org/opensearch/gradle/precommit/DependencyLicensesTaskTests.java index 6bb6b90116394..bb216b27128e1 100644 --- a/buildSrc/src/test/java/org/opensearch/gradle/precommit/DependencyLicensesTaskTests.java +++ b/buildSrc/src/test/java/org/opensearch/gradle/precommit/DependencyLicensesTaskTests.java @@ -35,6 +35,7 @@ import org.gradle.api.Action; import org.gradle.api.GradleException; import org.gradle.api.Project; +import org.gradle.api.artifacts.Configuration; import org.gradle.api.artifacts.Dependency; import org.gradle.api.file.FileCollection; import org.gradle.api.plugins.JavaPlugin; @@ -95,7 +96,7 @@ public void givenProjectWithoutLicensesDirButWithDependenciesThenShouldThrowExce expectedException.expect(GradleException.class); expectedException.expectMessage(containsString("does not exist, but there are dependencies")); - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); task.get().checkDependencies(); } @@ -113,7 +114,7 @@ public void givenProjectWithDependencyButNoShaFileThenShouldReturnException() th createFileIn(licensesDir, "groovy-LICENSE.txt", PERMISSIVE_LICENSE_TEXT); createFileIn(licensesDir, "groovy-NOTICE.txt", ""); - project.getDependencies().add("compileClasspath", project.getDependencies().localGroovy()); + project.getDependencies().add("someCompileConfiguration", project.getDependencies().localGroovy()); task.get().checkDependencies(); } @@ -122,7 +123,7 @@ public void givenProjectWithDependencyButNoLicenseFileThenShouldReturnException( expectedException.expect(GradleException.class); expectedException.expectMessage(containsString("Missing LICENSE for ")); - project.getDependencies().add("compileClasspath", project.getDependencies().localGroovy()); + project.getDependencies().add("someCompileConfiguration", project.getDependencies().localGroovy()); getLicensesDir(project).mkdir(); updateShas.updateShas(); @@ -134,7 +135,7 @@ public void givenProjectWithDependencyButNoNoticeFileThenShouldReturnException() expectedException.expect(GradleException.class); expectedException.expectMessage(containsString("Missing NOTICE for ")); - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); createFileIn(getLicensesDir(project), "groovy-LICENSE.txt", PERMISSIVE_LICENSE_TEXT); @@ -147,7 +148,7 @@ public void givenProjectWithStrictDependencyButNoSourcesFileThenShouldReturnExce expectedException.expect(GradleException.class); expectedException.expectMessage(containsString("Missing SOURCES for ")); - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); createFileIn(getLicensesDir(project), "groovy-LICENSE.txt", STRICT_LICENSE_TEXT); createFileIn(getLicensesDir(project), "groovy-NOTICE.txt", ""); @@ -158,7 +159,7 @@ public void givenProjectWithStrictDependencyButNoSourcesFileThenShouldReturnExce @Test public void givenProjectWithStrictDependencyAndEverythingInOrderThenShouldReturnSilently() throws Exception { - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); createFileIn(getLicensesDir(project), "groovy-LICENSE.txt", STRICT_LICENSE_TEXT); createFileIn(getLicensesDir(project), "groovy-NOTICE.txt", ""); @@ -174,7 +175,7 @@ public void givenProjectWithStrictDependencyAndEverythingInOrderThenShouldReturn @Test public void givenProjectWithDependencyAndEverythingInOrderThenShouldReturnSilently() throws Exception { - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); File licensesDir = getLicensesDir(project); @@ -187,7 +188,7 @@ public void givenProjectWithALicenseButWithoutTheDependencyThenShouldThrowExcept expectedException.expect(GradleException.class); expectedException.expectMessage(containsString("Unused license ")); - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); File licensesDir = getLicensesDir(project); createAllDefaultDependencyFiles(licensesDir, "groovy", "javaparser-core"); @@ -201,7 +202,7 @@ public void givenProjectWithANoticeButWithoutTheDependencyThenShouldThrowExcepti expectedException.expect(GradleException.class); expectedException.expectMessage(containsString("Unused notice ")); - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); File licensesDir = getLicensesDir(project); createAllDefaultDependencyFiles(licensesDir, "groovy", "javaparser-core"); @@ -215,7 +216,7 @@ public void givenProjectWithAShaButWithoutTheDependencyThenShouldThrowException( expectedException.expect(GradleException.class); expectedException.expectMessage(containsString("Unused sha files found: \n")); - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); File licensesDir = getLicensesDir(project); createAllDefaultDependencyFiles(licensesDir, "groovy", "javaparser-core"); @@ -229,7 +230,7 @@ public void givenProjectWithADependencyWithWrongShaThenShouldThrowException() th expectedException.expect(GradleException.class); expectedException.expectMessage(containsString("SHA has changed! Expected ")); - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); File licensesDir = getLicensesDir(project); createAllDefaultDependencyFiles(licensesDir, "groovy"); @@ -243,7 +244,7 @@ public void givenProjectWithADependencyWithWrongShaThenShouldThrowException() th @Test public void givenProjectWithADependencyMappingThenShouldReturnSilently() throws Exception { - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); File licensesDir = getLicensesDir(project); createAllDefaultDependencyFiles(licensesDir, "groovy", "javaparser"); @@ -258,7 +259,7 @@ public void givenProjectWithADependencyMappingThenShouldReturnSilently() throws @Test public void givenProjectWithAIgnoreShaConfigurationAndNoShaFileThenShouldReturnSilently() throws Exception { - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); File licensesDir = getLicensesDir(project); createFileIn(licensesDir, "groovy-LICENSE.txt", PERMISSIVE_LICENSE_TEXT); @@ -297,6 +298,11 @@ private Project createProject() { Project project = ProjectBuilder.builder().build(); project.getPlugins().apply(JavaPlugin.class); + Configuration compileClasspath = project.getConfigurations().getByName("compileClasspath"); + Configuration someCompileConfiguration = project.getConfigurations().create("someCompileConfiguration"); + // Declare a configuration that is going to resolve the compile classpath of the application + project.getConfigurations().add(compileClasspath.extendsFrom(someCompileConfiguration)); + return project; } diff --git a/buildSrc/src/test/java/org/opensearch/gradle/precommit/UpdateShasTaskTests.java b/buildSrc/src/test/java/org/opensearch/gradle/precommit/UpdateShasTaskTests.java index a4f3dfb92a04f..2deabb752017a 100644 --- a/buildSrc/src/test/java/org/opensearch/gradle/precommit/UpdateShasTaskTests.java +++ b/buildSrc/src/test/java/org/opensearch/gradle/precommit/UpdateShasTaskTests.java @@ -36,6 +36,7 @@ import org.gradle.api.Action; import org.gradle.api.GradleException; import org.gradle.api.Project; +import org.gradle.api.artifacts.Configuration; import org.gradle.api.artifacts.Dependency; import org.gradle.api.file.FileCollection; import org.gradle.api.plugins.JavaPlugin; @@ -86,7 +87,7 @@ public void whenDependencyDoesntExistThenShouldDeleteDependencySha() throws IOEx @Test public void whenDependencyExistsButShaNotThenShouldCreateNewShaFile() throws IOException, NoSuchAlgorithmException { - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); getLicensesDir(project).mkdir(); task.updateShas(); @@ -99,7 +100,7 @@ public void whenDependencyExistsButShaNotThenShouldCreateNewShaFile() throws IOE @Test public void whenDependencyAndWrongShaExistsThenShouldNotOverwriteShaFile() throws IOException, NoSuchAlgorithmException { - project.getDependencies().add("compileClasspath", dependency); + project.getDependencies().add("someCompileConfiguration", dependency); File groovyJar = task.getParentTask().getDependencies().getFiles().iterator().next(); String groovyShaName = groovyJar.getName() + ".sha1"; @@ -122,6 +123,11 @@ private Project createProject() { Project project = ProjectBuilder.builder().build(); project.getPlugins().apply(JavaPlugin.class); + Configuration compileClasspath = project.getConfigurations().getByName("compileClasspath"); + Configuration someCompileConfiguration = project.getConfigurations().create("someCompileConfiguration"); + // Declare a configuration that is going to resolve the compile classpath of the application + project.getConfigurations().add(compileClasspath.extendsFrom(someCompileConfiguration)); + return project; } diff --git a/buildSrc/src/testKit/thirdPartyAudit/sample_jars/build.gradle b/buildSrc/src/testKit/thirdPartyAudit/sample_jars/build.gradle index f0f9e74ba96a2..820c303a2e79f 100644 --- a/buildSrc/src/testKit/thirdPartyAudit/sample_jars/build.gradle +++ b/buildSrc/src/testKit/thirdPartyAudit/sample_jars/build.gradle @@ -41,7 +41,7 @@ dependencies { ["0.0.1"].forEach { v -> ["opensearch", "other"].forEach { p -> tasks.register("broken-log4j-${p}-${v}", Jar) { - destinationDir = file("${buildDir}/testrepo/org/${p}/gradle/broken-log4j/${v}/") + destinationDirectory = file("${buildDir}/testrepo/org/${p}/gradle/broken-log4j/${v}/") archiveFileName = "broken-log4j-${v}.jar" from sourceSets.main.output include "**/TestingLog4j.class" @@ -51,7 +51,7 @@ dependencies { } tasks.register("jarhellJdk", Jar) { - destinationDir = file("${buildDir}/testrepo/org/other/gradle/jarhellJdk/0.0.1/") + destinationDirectory = file("${buildDir}/testrepo/org/other/gradle/jarhellJdk/0.0.1/") archiveFileName = "jarhellJdk-0.0.1.jar" from sourceSets.main.output include "**/String.class" diff --git a/buildSrc/version.properties b/buildSrc/version.properties index 8e2a1967b5b60..0fb8f85cd669c 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -9,7 +9,7 @@ spatial4j = 0.7 jts = 1.15.0 jackson = 2.14.2 jackson_databind = 2.14.2 -snakeyaml = 1.32 +snakeyaml = 1.33 icu4j = 70.1 supercsv = 2.4.0 # Update to 2.17.2+ is breaking OpenSearchJsonLayout (see https://issues.apache.org/jira/browse/LOG4J2-3562) @@ -20,7 +20,8 @@ jettison = 1.5.1 woodstox = 6.4.0 kotlin = 1.7.10 antlr4 = 4.11.1 - +guava = 31.1-jre + # when updating the JNA version, also update the version in buildSrc/build.gradle jna = 5.5.0 diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index 3c644dc530af0..4b507351b1133 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -63,7 +63,7 @@ import java.util.regex.Pattern */ plugins { - id "nebula.ospackage-base" version "9.1.1" + id "com.netflix.nebula.ospackage-base" version "11.0.0" } void addProcessFilesTask(String type, boolean jdk) { @@ -290,7 +290,7 @@ Closure commonPackageConfig(String type, boolean jdk, String architecture) { } } -apply plugin: 'nebula.ospackage-base' +apply plugin: 'com.netflix.nebula.ospackage-base' // this is package indepdendent configuration ospackage { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f2ae88..ccebba7710dea 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7e42e8ab05a2e..f838ec064ae64 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -11,7 +11,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionSha256Sum=312eb12875e1747e05c2f81a4789902d7e4ec5defbd1eefeaccc08acf096505d +distributionSha256Sum=f30b29580fe11719087d698da23f3b0f0d04031d8995f7dd8275a31f7674dc01 diff --git a/gradlew b/gradlew index 1b6c787337ffb..79a61d421cc4e 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,10 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,12 +143,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -205,6 +209,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index ac1b06f93825d..6689b85beecde 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/libs/x-content/licenses/snakeyaml-1.32.jar.sha1 b/libs/x-content/licenses/snakeyaml-1.32.jar.sha1 deleted file mode 100644 index 3216ba485951a..0000000000000 --- a/libs/x-content/licenses/snakeyaml-1.32.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e80612549feb5c9191c498de628c1aa80693cf0b \ No newline at end of file diff --git a/libs/x-content/licenses/snakeyaml-1.33.jar.sha1 b/libs/x-content/licenses/snakeyaml-1.33.jar.sha1 new file mode 100644 index 0000000000000..c8a323290e7ba --- /dev/null +++ b/libs/x-content/licenses/snakeyaml-1.33.jar.sha1 @@ -0,0 +1 @@ +2cd0a87ff7df953f810c344bdf2fe3340b954c69 \ No newline at end of file diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index a2b76df6696b4..259ebf424da67 100644 --- a/modules/lang-painless/build.gradle +++ b/modules/lang-painless/build.gradle @@ -71,7 +71,7 @@ test { } shadowJar { - classifier = null + archiveClassifier.set('') relocate 'org.objectweb', 'org.opensearch.repackage.org.objectweb' dependencies { include(dependency("org.ow2.asm:asm:${versions.asm}")) diff --git a/plugins/examples/build.gradle b/plugins/examples/build.gradle index 460c6e81eac5c..4a6228b227f95 100644 --- a/plugins/examples/build.gradle +++ b/plugins/examples/build.gradle @@ -31,8 +31,8 @@ gradle.projectsEvaluated { configure(project('painless-whitelist')) { configurations.all { resolutionStrategy.dependencySubstitution { - substitute module('org.opensearch.plugin:opensearch-scripting-painless-spi') with project(':modules:lang-painless:spi') - substitute module('org.opensearch.test:logger-usage') with project(':test:logger-usage') + substitute module('org.opensearch.plugin:opensearch-scripting-painless-spi') using project(':modules:lang-painless:spi') + substitute module('org.opensearch.test:logger-usage') using project(':test:logger-usage') } } } diff --git a/plugins/ingest-attachment/build.gradle b/plugins/ingest-attachment/build.gradle index 0380b5f229838..ec59442752292 100644 --- a/plugins/ingest-attachment/build.gradle +++ b/plugins/ingest-attachment/build.gradle @@ -54,7 +54,7 @@ dependencies { api "org.apache.tika:tika-langdetect-optimaize:${versions.tika}" // Optimaize libraries/dependencies runtimeOnly "com.optimaize.languagedetector:language-detector:0.6" - runtimeOnly 'com.google.guava:guava:23.0' + runtimeOnly "com.google.guava:guava:${versions.guava}" // Other dependencies api 'org.tukaani:xz:1.9' api 'commons-io:commons-io:2.11.0' diff --git a/plugins/ingest-attachment/licenses/guava-23.0.jar.sha1 b/plugins/ingest-attachment/licenses/guava-23.0.jar.sha1 deleted file mode 100644 index 197134628d939..0000000000000 --- a/plugins/ingest-attachment/licenses/guava-23.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c947004bb13d18182be60077ade044099e4f26f1 \ No newline at end of file diff --git a/plugins/ingest-attachment/licenses/guava-31.1-jre.jar.sha1 b/plugins/ingest-attachment/licenses/guava-31.1-jre.jar.sha1 new file mode 100644 index 0000000000000..e57390ebe1299 --- /dev/null +++ b/plugins/ingest-attachment/licenses/guava-31.1-jre.jar.sha1 @@ -0,0 +1 @@ +60458f877d055d0c9114d9e1a2efb737b4bc282c \ No newline at end of file diff --git a/plugins/repository-hdfs/build.gradle b/plugins/repository-hdfs/build.gradle index a550fe22c5836..d1c5d9c009819 100644 --- a/plugins/repository-hdfs/build.gradle +++ b/plugins/repository-hdfs/build.gradle @@ -62,13 +62,14 @@ dependencies { runtimeOnly "org.apache.hadoop:hadoop-client-runtime:${versions.hadoop3}" api("org.apache.hadoop:hadoop-hdfs:${versions.hadoop3}") { exclude module: 'jetty-server' + exclude group: 'org.codehaus.jackson' } api 'org.apache.htrace:htrace-core4:4.2.0-incubating' api "org.apache.logging.log4j:log4j-core:${versions.log4j}" - api 'org.apache.avro:avro:1.10.2' - api 'com.google.code.gson:gson:2.10' - runtimeOnly 'com.google.guava:guava:31.1-jre' - api 'com.google.protobuf:protobuf-java:3.21.9' + api 'org.apache.avro:avro:1.11.1' + api 'com.google.code.gson:gson:2.10.1' + runtimeOnly "com.google.guava:guava:${versions.guava}" + api 'com.google.protobuf:protobuf-java:3.21.12' api "commons-logging:commons-logging:${versions.commonslogging}" api 'commons-cli:commons-cli:1.2' api "commons-codec:commons-codec:${versions.commonscodec}" diff --git a/plugins/repository-hdfs/licenses/avro-1.10.2.jar.sha1 b/plugins/repository-hdfs/licenses/avro-1.10.2.jar.sha1 deleted file mode 100644 index eae1c5116ff0f..0000000000000 --- a/plugins/repository-hdfs/licenses/avro-1.10.2.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a65aaa91c1aeceb3dd4859dbb9765d1c2063f5a2 \ No newline at end of file diff --git a/plugins/repository-hdfs/licenses/avro-1.11.1.jar.sha1 b/plugins/repository-hdfs/licenses/avro-1.11.1.jar.sha1 new file mode 100644 index 0000000000000..f03424516b44e --- /dev/null +++ b/plugins/repository-hdfs/licenses/avro-1.11.1.jar.sha1 @@ -0,0 +1 @@ +81af5d4b9bdaaf4ba41bcb0df5241355ec34c630 \ No newline at end of file diff --git a/plugins/repository-hdfs/licenses/gson-2.10.1.jar.sha1 b/plugins/repository-hdfs/licenses/gson-2.10.1.jar.sha1 new file mode 100644 index 0000000000000..9810309d1013a --- /dev/null +++ b/plugins/repository-hdfs/licenses/gson-2.10.1.jar.sha1 @@ -0,0 +1 @@ +b3add478d4382b78ea20b1671390a858002feb6c \ No newline at end of file diff --git a/plugins/repository-hdfs/licenses/gson-2.10.jar.sha1 b/plugins/repository-hdfs/licenses/gson-2.10.jar.sha1 deleted file mode 100644 index 64f28f71ab421..0000000000000 --- a/plugins/repository-hdfs/licenses/gson-2.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dd9b193aef96e973d5a11ab13cd17430c2e4306b \ No newline at end of file diff --git a/plugins/repository-hdfs/licenses/protobuf-java-3.21.12.jar.sha1 b/plugins/repository-hdfs/licenses/protobuf-java-3.21.12.jar.sha1 new file mode 100644 index 0000000000000..e86ed957b6625 --- /dev/null +++ b/plugins/repository-hdfs/licenses/protobuf-java-3.21.12.jar.sha1 @@ -0,0 +1 @@ +5589e79a33cb6509f7e681d7cf4fc59d47c51c71 \ No newline at end of file diff --git a/plugins/repository-hdfs/licenses/protobuf-java-3.21.9.jar.sha1 b/plugins/repository-hdfs/licenses/protobuf-java-3.21.9.jar.sha1 deleted file mode 100644 index 2e03dbe5dafd0..0000000000000 --- a/plugins/repository-hdfs/licenses/protobuf-java-3.21.9.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ed1240d9231044ce6ccf1978512f6e44416bb7e7 \ No newline at end of file diff --git a/qa/wildfly/build.gradle b/qa/wildfly/build.gradle index 2945027eea8a1..353f9d54f91e3 100644 --- a/qa/wildfly/build.gradle +++ b/qa/wildfly/build.gradle @@ -41,8 +41,8 @@ testFixtures.useFixture() dependencies { providedCompile 'javax.enterprise:cdi-api:2.0' providedCompile 'org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:1.0.2.Final' - providedCompile 'org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec:1.0.0.Final' - api('org.jboss.resteasy:resteasy-jackson2-provider:3.0.19.Final') { + providedCompile 'org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec:1.0.1.Final' + api('org.jboss.resteasy:resteasy-jackson2-provider:3.0.26.Final') { exclude module: 'jackson-annotations' exclude module: 'jackson-core' exclude module: 'jackson-databind' diff --git a/test/fixtures/hdfs-fixture/build.gradle b/test/fixtures/hdfs-fixture/build.gradle index d30f3aad939bd..b8b5406bd39f3 100644 --- a/test/fixtures/hdfs-fixture/build.gradle +++ b/test/fixtures/hdfs-fixture/build.gradle @@ -36,6 +36,9 @@ dependencies { api("org.apache.hadoop:hadoop-minicluster:3.3.4") { exclude module: 'websocket-client' exclude module: 'jettison' + exclude module: 'netty' + exclude module: 'guava' + exclude group: 'org.codehaus.jackson' } api "org.codehaus.jettison:jettison:${versions.jettison}" api "org.apache.commons:commons-compress:1.21" @@ -53,4 +56,7 @@ dependencies { api "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}" api 'org.eclipse.jetty:jetty-server:9.4.49.v20220914' api 'org.apache.zookeeper:zookeeper:3.8.0' + api "org.apache.commons:commons-text:1.10.0" + api "commons-net:commons-net:3.9.0" + runtimeOnly "com.google.guava:guava:${versions.guava}" } diff --git a/test/framework/build.gradle b/test/framework/build.gradle index 816ca66c9a255..00d907ce6d108 100644 --- a/test/framework/build.gradle +++ b/test/framework/build.gradle @@ -27,7 +27,7 @@ * specific language governing permissions and limitations * under the License. */ -import org.opensearch.gradle.info.BuildParams; +import org.opensearch.gradle.info.BuildParams apply plugin: 'opensearch.build' apply plugin: 'opensearch.publish'