From df11cc9de48f63b0b82816b59660a101e8aab842 Mon Sep 17 00:00:00 2001 From: Rabi Panda Date: Thu, 18 Mar 2021 16:14:19 -0700 Subject: [PATCH] [Rename] Fix gradle build as part of the renaming process. (#397) This commit fixes the currently broken gradle build resulted from the renaming work. It reverts a few dependencies and comments out the `opensearch_distibutions` task which is currently failing for some builds. We will address these separately in the future once we have a working build. Signed-off-by: Rabi Panda --- build.gradle | 32 +++++++++---------- .../gradle/doc/DocsTestPlugin.groovy | 4 +-- .../gradle/plugin/PluginBuildPlugin.groovy | 12 +++---- .../gradle/test/ClusterConfiguration.groovy | 2 +- .../gradle/test/ClusterFormationTasks.groovy | 16 +++++----- .../opensearch/gradle/test/NodeInfo.groovy | 2 +- .../gradle/test/rest/RestTestUtil.java | 2 +- ...properties => opensearch.build.properties} | 0 ...ensearch.distribution-download.properties} | 0 ...ties => opensearch.distro-test.properties} | 0 ...s => opensearch.docker-support.properties} | 0 ...erties => opensearch.docs-test.properties} | 0 ...> opensearch.global-build-info.properties} | 0 ...ensearch.internal-cluster-test.properties} | 0 ...nal-distribution-archive-check.properties} | 0 ...nal-distribution-archive-setup.properties} | 0 ...nternal-distribution-bwc-setup.properties} | 0 ...internal-distribution-download.properties} | 0 ...s => opensearch.java-rest-test.properties} | 0 ....properties => opensearch.java.properties} | 0 ...ies => opensearch.jdk-download.properties} | 0 ...=> opensearch.opensearchplugin.properties} | 0 ...operties => opensearch.publish.properties} | 0 ...roperties => opensearch.reaper.properties} | 0 ...ies => opensearch.repositories.properties} | 0 ...s => opensearch.rest-resources.properties} | 0 ...erties => opensearch.rest-test.properties} | 0 ...pensearch.standalone-rest-test.properties} | 0 ... => opensearch.standalone-test.properties} | 0 ...h.symbolic-link-preserving-tar.properties} | 0 ...erties => opensearch.test-base.properties} | 0 ...nsearch.test-with-dependencies.properties} | 0 ...es => opensearch.test-with-ssl.properties} | 0 ...es => opensearch.test.fixtures.properties} | 0 ...ies => opensearch.testclusters.properties} | 0 ... opensearch.validate-rest-spec.properties} | 0 ...s => opensearch.yaml-rest-test.properties} | 0 ...earch.properties => opensearch.properties} | 0 client/rest/build.gradle | 4 +-- client/sniffer/build.gradle | 4 +-- distribution/docker/build.gradle | 11 ++++--- modules/aggs-matrix-stats/build.gradle | 2 +- modules/analysis-common/build.gradle | 2 +- modules/geo/build.gradle | 2 +- modules/ingest-common/build.gradle | 2 +- modules/ingest-geoip/build.gradle | 4 +-- modules/ingest-user-agent/build.gradle | 2 +- modules/lang-expression/build.gradle | 2 +- modules/lang-mustache/build.gradle | 2 +- modules/lang-painless/build.gradle | 2 +- modules/mapper-extras/build.gradle | 2 +- modules/opensearch-dashboards/build.gradle | 2 +- modules/parent-join/build.gradle | 2 +- modules/percolator/build.gradle | 2 +- modules/rank-eval/build.gradle | 2 +- modules/reindex/build.gradle | 4 +-- modules/repository-url/build.gradle | 2 +- modules/systemd/build.gradle | 2 +- modules/transport-netty4/build.gradle | 2 +- plugins/analysis-phonetic/build.gradle | 2 +- plugins/repository-hdfs/build.gradle | 2 +- qa/die-with-dignity/build.gradle | 4 +-- qa/os/build.gradle | 4 +-- qa/remote-clusters/build.gradle | 10 ++++-- qa/wildfly/build.gradle | 10 ++++-- rest-api-spec/build.gradle | 10 +++--- server/build.gradle | 2 +- settings.gradle | 6 ++-- test/external-modules/build.gradle | 6 ++-- .../delayed-aggs/build.gradle | 2 +- test/framework/build.gradle | 4 +-- 71 files changed, 100 insertions(+), 91 deletions(-) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.build.properties => opensearch.build.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.distribution-download.properties => opensearch.distribution-download.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.distro-test.properties => opensearch.distro-test.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.docker-support.properties => opensearch.docker-support.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.docs-test.properties => opensearch.docs-test.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.global-build-info.properties => opensearch.global-build-info.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.internal-cluster-test.properties => opensearch.internal-cluster-test.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.internal-distribution-archive-check.properties => opensearch.internal-distribution-archive-check.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.internal-distribution-archive-setup.properties => opensearch.internal-distribution-archive-setup.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.internal-distribution-bwc-setup.properties => opensearch.internal-distribution-bwc-setup.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.internal-distribution-download.properties => opensearch.internal-distribution-download.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.java-rest-test.properties => opensearch.java-rest-test.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.java.properties => opensearch.java.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.jdk-download.properties => opensearch.jdk-download.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.esplugin.properties => opensearch.opensearchplugin.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.publish.properties => opensearch.publish.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.reaper.properties => opensearch.reaper.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.repositories.properties => opensearch.repositories.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.rest-resources.properties => opensearch.rest-resources.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.rest-test.properties => opensearch.rest-test.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.standalone-rest-test.properties => opensearch.standalone-rest-test.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.standalone-test.properties => opensearch.standalone-test.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.symbolic-link-preserving-tar.properties => opensearch.symbolic-link-preserving-tar.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.test-base.properties => opensearch.test-base.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.test-with-dependencies.properties => opensearch.test-with-dependencies.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.test-with-ssl.properties => opensearch.test-with-ssl.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.test.fixtures.properties => opensearch.test.fixtures.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.testclusters.properties => opensearch.testclusters.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.validate-rest-spec.properties => opensearch.validate-rest-spec.properties} (100%) rename buildSrc/src/main/resources/META-INF/gradle-plugins/{elasticsearch.yaml-rest-test.properties => opensearch.yaml-rest-test.properties} (100%) rename buildSrc/src/main/resources/{elasticsearch.properties => opensearch.properties} (100%) diff --git a/build.gradle b/build.gradle index 5d970cb3e7a..1cbb1984fd4 100644 --- a/build.gradle +++ b/build.gradle @@ -21,21 +21,21 @@ import com.avast.gradle.dockercompose.tasks.ComposePull import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin import de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin import org.apache.tools.ant.taskdefs.condition.Os -import org.elasticsearch.gradle.BuildPlugin -import org.elasticsearch.gradle.Version -import org.elasticsearch.gradle.VersionProperties -import org.elasticsearch.gradle.info.BuildParams -import org.elasticsearch.gradle.plugin.PluginBuildPlugin +import org.opensearch.gradle.BuildPlugin +import org.opensearch.gradle.Version +import org.opensearch.gradle.VersionProperties +import org.opensearch.gradle.info.BuildParams +import org.opensearch.gradle.plugin.PluginBuildPlugin import org.gradle.plugins.ide.eclipse.model.AccessRule import org.gradle.plugins.ide.eclipse.model.SourceFolder import org.gradle.util.DistributionLocator import org.gradle.util.GradleVersion -import static org.elasticsearch.gradle.util.GradleUtils.maybeConfigure +import static org.opensearch.gradle.util.GradleUtils.maybeConfigure plugins { id 'lifecycle-base' - id 'elasticsearch.docker-support' - id 'elasticsearch.global-build-info' + id 'opensearch.docker-support' + id 'opensearch.global-build-info' id "com.diffplug.spotless" version "5.6.1" apply false } @@ -50,14 +50,14 @@ apply from: 'gradle/run.gradle' // common maven publishing configuration allprojects { - group = 'org.elasticsearch' - version = VersionProperties.elasticsearch - description = "Elasticsearch subproject ${project.path}" + group = 'org.opensearch' + version = VersionProperties.getOpenSearch() + description = "OpenSearch subproject ${project.path}" } configure(allprojects - project(':distribution:archives:integ-test-zip')) { project.pluginManager.withPlugin('nebula.maven-base-publish') { - if (project.pluginManager.hasPlugin('elasticsearch.build') == false) { + if (project.pluginManager.hasPlugin('opensearch.build') == false) { throw new GradleException("Project ${path} publishes a pom but doesn't apply the build plugin.") } } @@ -219,11 +219,11 @@ allprojects { project.afterEvaluate { // Handle javadoc dependencies across projects. Order matters: the linksOffline for - // org.elasticsearch:elasticsearch must be the last one or all the links for the - // other packages (e.g org.elasticsearch.client) will point to server rather than + // org.opensearch:opensearch must be the last one or all the links for the + // other packages (e.g org.opensearch.client) will point to server rather than // their own artifacts. if (project.plugins.hasPlugin(BuildPlugin) || project.plugins.hasPlugin(PluginBuildPlugin)) { - String artifactsHost = VersionProperties.elasticsearch.endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co" + String artifactsHost = VersionProperties.getOpenSearch().endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co" Closure sortClosure = { a, b -> b.group <=> a.group } Closure depJavadocClosure = { shadowed, dep -> if ((dep instanceof ProjectDependency) == false) { @@ -416,7 +416,7 @@ gradle.projectsEvaluated { } allprojects { - tasks.register('resolveAllDependencies', org.elasticsearch.gradle.ResolveAllDependencies) { + tasks.register('resolveAllDependencies', org.opensearch.gradle.ResolveAllDependencies) { configs = project.configurations if (project.path.contains("fixture")) { dependsOn tasks.withType(ComposePull) diff --git a/buildSrc/src/main/groovy/org/opensearch/gradle/doc/DocsTestPlugin.groovy b/buildSrc/src/main/groovy/org/opensearch/gradle/doc/DocsTestPlugin.groovy index 93c095a1406..a7f097af4bf 100644 --- a/buildSrc/src/main/groovy/org/opensearch/gradle/doc/DocsTestPlugin.groovy +++ b/buildSrc/src/main/groovy/org/opensearch/gradle/doc/DocsTestPlugin.groovy @@ -47,8 +47,8 @@ class DocsTestPlugin implements Plugin { * the values may differ. In particular {version} needs to resolve * to the version being built for testing but needs to resolve to * the last released version for docs. */ - '\\{version\\}': Version.fromString(VersionProperties.opensearch).toString(), - '\\{version_qualified\\}': VersionProperties.opensearch, + '\\{version\\}': Version.fromString(VersionProperties.getOpenSearch()).toString(), + '\\{version_qualified\\}': VersionProperties.getOpenSearch(), '\\{lucene_version\\}' : VersionProperties.lucene.replaceAll('-snapshot-\\w+$', ''), '\\{build_type\\}' : OS.conditionalString().onWindows({"zip"}).onUnix({"tar"}).supply(), ] diff --git a/buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy b/buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy index 4429c3bb236..8fcc9fb3dd6 100644 --- a/buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy @@ -48,7 +48,7 @@ import org.gradle.jvm.tasks.Jar */ class PluginBuildPlugin implements Plugin { - public static final String PLUGIN_EXTENSION_NAME = 'esplugin' + public static final String PLUGIN_EXTENSION_NAME = 'opensearchplugin' @Override void apply(Project project) { @@ -79,20 +79,20 @@ class PluginBuildPlugin implements Plugin { project.description = extension1.description if (extension1.name == null) { - throw new InvalidUserDataException('name is a required setting for esplugin') + throw new InvalidUserDataException('name is a required setting for opensearchplugin') } if (extension1.description == null) { - throw new InvalidUserDataException('description is a required setting for esplugin') + throw new InvalidUserDataException('description is a required setting for opensearchplugin') } if (extension1.classname == null) { - throw new InvalidUserDataException('classname is a required setting for esplugin') + throw new InvalidUserDataException('classname is a required setting for opensearchplugin') } Map properties = [ 'name' : extension1.name, 'description' : extension1.description, 'version' : extension1.version, - 'opensearchVersion': Version.fromString(VersionProperties.opensearch).toString(), + 'opensearchVersion': Version.fromString(VersionProperties.getOpenSearch()).toString(), 'javaVersion' : project.targetCompatibility as String, 'classname' : extension1.classname, 'extendedPlugins' : extension1.extendedPlugins.join(','), @@ -164,7 +164,7 @@ class PluginBuildPlugin implements Plugin { compileOnly "org.locationtech.jts:jts-core:${project.versions.jts}" compileOnly "org.apache.logging.log4j:log4j-api:${project.versions.log4j}" compileOnly "org.apache.logging.log4j:log4j-core:${project.versions.log4j}" - compileOnly "org.opensearch:jna:${project.versions.jna}" + compileOnly "org.elasticsearch:jna:${project.versions.jna}" } } diff --git a/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterConfiguration.groovy b/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterConfiguration.groovy index 9489e8f6cb5..dfde5e7a26b 100644 --- a/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterConfiguration.groovy +++ b/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterConfiguration.groovy @@ -236,7 +236,7 @@ class ClusterConfiguration { plugins.put(name, mavenCoords) } - /** Add a module to the cluster. The project must be an esplugin and have a single zip default artifact. */ + /** Add a module to the cluster. The project must be an opensearchplugin and have a single zip default artifact. */ @Input void module(Project moduleProject) { modules.add(moduleProject) diff --git a/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterFormationTasks.groovy b/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterFormationTasks.groovy index 9fc0e6c322b..6da8d499787 100644 --- a/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterFormationTasks.groovy +++ b/buildSrc/src/main/groovy/org/opensearch/gradle/test/ClusterFormationTasks.groovy @@ -93,7 +93,7 @@ class ClusterFormationTasks { if (System.getProperty('tests.distribution', 'oss') == 'integ-test-zip') { throw new Exception("tests.distribution=integ-test-zip is not supported") } - configureDistributionDependency(project, config.distribution, currentDistro, VersionProperties.opensearch) + configureDistributionDependency(project, config.distribution, currentDistro, VersionProperties.getOpenSearch()) boolean hasBwcNodes = config.numBwcNodes > 0 if (hasBwcNodes) { if (config.bwcVersion == null) { @@ -123,7 +123,7 @@ class ClusterFormationTasks { } distro = bwcDistro } else { - opensearchVersion = VersionProperties.opensearch + opensearchVersion = VersionProperties.getOpenSearch() distro = currentDistro } NodeInfo node = new NodeInfo(config, i, project, prefix, opensearchVersion, sharedDir) @@ -218,7 +218,7 @@ class ClusterFormationTasks { dependency = project.dependencies.project( path: unreleasedInfo.gradleProjectPath, configuration: snapshotProject ) - } else if (internalBuild && opensearchVersion.equals(VersionProperties.opensearch)) { + } else if (internalBuild && opensearchVersion.equals(VersionProperties.getOpenSearch())) { dependency = project.dependencies.project(path: ":distribution:archives:${snapshotProject}") } else { if (version.before('7.0.0')) { @@ -282,7 +282,7 @@ class ClusterFormationTasks { setup = configureAddKeystoreFileTasks(prefix, project, setup, node) if (node.config.plugins.isEmpty() == false) { - if (node.nodeVersion == Version.fromString(VersionProperties.opensearch)) { + if (node.nodeVersion == Version.fromString(VersionProperties.getOpenSearch())) { setup = configureCopyPluginsTask(taskName(prefix, node, 'copyPlugins'), project, setup, node, prefix) } else { setup = configureCopyBwcPluginsTask(taskName(prefix, node, 'copyBwcPlugins'), project, setup, node, prefix) @@ -629,7 +629,7 @@ class ClusterFormationTasks { return setup } if (module.plugins.hasPlugin(PluginBuildPlugin) == false) { - throw new GradleException("Task ${name} cannot include module ${module.path} which is not an esplugin") + throw new GradleException("Task ${name} cannot include module ${module.path} which is not an opensearchplugin") } Copy installModule = project.tasks.create(name, Copy.class) installModule.dependsOn(setup) @@ -641,7 +641,7 @@ class ClusterFormationTasks { static Task configureInstallPluginTask(String name, Project project, Task setup, NodeInfo node, String pluginName, String prefix) { FileCollection pluginZip; - if (node.nodeVersion != Version.fromString(VersionProperties.opensearch)) { + if (node.nodeVersion != Version.fromString(VersionProperties.getOpenSearch())) { pluginZip = project.configurations.getByName(pluginBwcConfigurationName(prefix, pluginName)) } else { pluginZip = project.configurations.getByName(pluginConfigurationName(prefix, pluginName)) @@ -986,13 +986,13 @@ class ClusterFormationTasks { static void verifyProjectHasBuildPlugin(String name, Version version, Project project, Project pluginProject) { if (pluginProject.plugins.hasPlugin(PluginBuildPlugin) == false) { throw new GradleException("Task [${name}] cannot add plugin [${pluginProject.path}] with version [${version}] to project's " + - "[${project.path}] dependencies: the plugin is not an esplugin") + "[${project.path}] dependencies: the plugin is not an opensearchplugin") } } /** Find the plugin name in the given project. */ static String findPluginName(Project pluginProject) { - PluginPropertiesExtension extension = pluginProject.extensions.findByName('esplugin') + PluginPropertiesExtension extension = pluginProject.extensions.findByName('opensearchplugin') return extension.name } diff --git a/buildSrc/src/main/groovy/org/opensearch/gradle/test/NodeInfo.groovy b/buildSrc/src/main/groovy/org/opensearch/gradle/test/NodeInfo.groovy index e39a25e2c59..e4ea3f113ee 100644 --- a/buildSrc/src/main/groovy/org/opensearch/gradle/test/NodeInfo.groovy +++ b/buildSrc/src/main/groovy/org/opensearch/gradle/test/NodeInfo.groovy @@ -126,7 +126,7 @@ class NodeInfo { baseDir = new File(project.buildDir, "cluster/${prefix} node${nodeNum}") pidFile = new File(baseDir, 'opensearch.pid') this.nodeVersion = Version.fromString(nodeVersion) - this.isBwcNode = this.nodeVersion.before(VersionProperties.opensearch) + this.isBwcNode = this.nodeVersion.before(VersionProperties.getOpenSearch()) homeDir = new File(baseDir, "opensearch-${nodeVersion}") pathConf = new File(homeDir, 'config') if (config.dataDir != null) { diff --git a/buildSrc/src/main/java/org/opensearch/gradle/test/rest/RestTestUtil.java b/buildSrc/src/main/java/org/opensearch/gradle/test/rest/RestTestUtil.java index 7350b5790b6..95db7c0e87a 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/test/rest/RestTestUtil.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/test/rest/RestTestUtil.java @@ -59,7 +59,7 @@ public class RestTestUtil { testTask.setTestClassesDirs(sourceSet.getOutput().getClassesDirs()); testTask.setClasspath(sourceSet.getRuntimeClasspath()); // if this a module or plugin, it may have an associated zip file with it's contents, add that to the test cluster - project.getPluginManager().withPlugin("opensearch.esplugin", plugin -> { + project.getPluginManager().withPlugin("opensearch.opensearchplugin", plugin -> { Zip bundle = (Zip) project.getTasks().getByName("bundlePlugin"); testTask.dependsOn(bundle); if (project.getPath().contains("modules:")) { diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.build.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.build.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.build.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.build.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.distribution-download.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.distribution-download.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.distribution-download.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.distribution-download.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.distro-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.distro-test.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.distro-test.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.distro-test.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.docker-support.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.docker-support.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.docker-support.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.docker-support.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.docs-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.docs-test.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.docs-test.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.docs-test.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.global-build-info.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.global-build-info.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.global-build-info.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.global-build-info.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-cluster-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-cluster-test.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-cluster-test.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-cluster-test.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-distribution-archive-check.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-distribution-archive-check.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-distribution-archive-check.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-distribution-archive-check.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-distribution-archive-setup.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-distribution-archive-setup.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-distribution-archive-setup.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-distribution-archive-setup.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-distribution-bwc-setup.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-distribution-bwc-setup.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-distribution-bwc-setup.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-distribution-bwc-setup.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-distribution-download.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-distribution-download.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.internal-distribution-download.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.internal-distribution-download.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.java-rest-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.java-rest-test.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.java-rest-test.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.java-rest-test.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.java.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.java.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.java.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.java.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.jdk-download.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.jdk-download.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.jdk-download.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.jdk-download.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.esplugin.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.opensearchplugin.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.esplugin.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.opensearchplugin.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.publish.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.publish.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.publish.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.publish.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.reaper.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.reaper.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.reaper.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.reaper.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.repositories.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.repositories.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.repositories.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.repositories.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.rest-resources.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.rest-resources.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.rest-resources.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.rest-resources.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.rest-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.rest-test.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.rest-test.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.rest-test.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.standalone-rest-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.standalone-rest-test.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.standalone-rest-test.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.standalone-rest-test.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.standalone-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.standalone-test.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.standalone-test.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.standalone-test.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.symbolic-link-preserving-tar.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.symbolic-link-preserving-tar.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.symbolic-link-preserving-tar.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.symbolic-link-preserving-tar.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.test-base.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.test-base.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.test-base.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.test-base.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.test-with-dependencies.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.test-with-dependencies.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.test-with-dependencies.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.test-with-dependencies.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.test-with-ssl.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.test-with-ssl.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.test-with-ssl.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.test-with-ssl.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.test.fixtures.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.test.fixtures.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.test.fixtures.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.test.fixtures.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.testclusters.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.testclusters.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.testclusters.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.testclusters.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.validate-rest-spec.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.validate-rest-spec.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.validate-rest-spec.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.validate-rest-spec.properties diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.yaml-rest-test.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.yaml-rest-test.properties similarity index 100% rename from buildSrc/src/main/resources/META-INF/gradle-plugins/elasticsearch.yaml-rest-test.properties rename to buildSrc/src/main/resources/META-INF/gradle-plugins/opensearch.yaml-rest-test.properties diff --git a/buildSrc/src/main/resources/elasticsearch.properties b/buildSrc/src/main/resources/opensearch.properties similarity index 100% rename from buildSrc/src/main/resources/elasticsearch.properties rename to buildSrc/src/main/resources/opensearch.properties diff --git a/client/rest/build.gradle b/client/rest/build.gradle index 7ae804a8b78..6575124b4a9 100644 --- a/client/rest/build.gradle +++ b/client/rest/build.gradle @@ -39,8 +39,8 @@ dependencies { testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testImplementation "junit:junit:${versions.junit}" testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}" - testImplementation "org.opensearch:securemock:${versions.securemock}" - testImplementation "org.opensearch:mocksocket:${versions.mocksocket}" + testImplementation "org.elasticsearch:securemock:${versions.securemock}" + testImplementation "org.elasticsearch:mocksocket:${versions.mocksocket}" } tasks.withType(CheckForbiddenApis).configureEach { diff --git a/client/sniffer/build.gradle b/client/sniffer/build.gradle index 636bd6d3180..8138bf579cc 100644 --- a/client/sniffer/build.gradle +++ b/client/sniffer/build.gradle @@ -36,8 +36,8 @@ dependencies { testImplementation project(":client:test") testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testImplementation "junit:junit:${versions.junit}" - testImplementation "org.opensearch:securemock:${versions.securemock}" - testImplementation "org.opensearch:mocksocket:${versions.mocksocket}" + testImplementation "org.elasticsearch:securemock:${versions.securemock}" + testImplementation "org.elasticsearch:mocksocket:${versions.mocksocket}" } tasks.named('forbiddenApisMain').configure { diff --git a/distribution/docker/build.gradle b/distribution/docker/build.gradle index d3771ee10d5..10f96628090 100644 --- a/distribution/docker/build.gradle +++ b/distribution/docker/build.gradle @@ -39,7 +39,7 @@ ext.expansions = { Architecture architecture, DockerBase base, boolean local -> classifier = "linux-\$(arch)" } - final String opensearch = "opensearch-oss-${VersionProperties.opensearch}-${classifier}.tar.gz" + final String opensearch = "opensearch-oss-${VersionProperties.getOpenSearch()}-${classifier}.tar.gz" /* Both the following Dockerfile commands put the resulting artifact at * the same location, regardless of classifier, so that the commands that @@ -52,7 +52,7 @@ ext.expansions = { Architecture architecture, DockerBase base, boolean local -> //TODO - replace the URL for OpenSearch when available sourceOpenSearch = """ RUN curl --retry 8 -S -L \\ - --output /opt/elasticsearch.tar.gz \\ + --output /opt/opensearch.tar.gz \\ https://artifacts-no-kpi.elastic.co/downloads/elasticsearch/$elasticsearch """ } @@ -65,7 +65,7 @@ RUN curl --retry 8 -S -L \\ 'package_manager' : 'yum', 'source_opensearch' : sourceOpenSearch, 'docker_base' : base.name().toLowerCase(), - 'version' : VersionProperties.opensearch + 'version' : VersionProperties.getOpenSearch() ] } @@ -130,6 +130,7 @@ def createAndSetWritable(Object... locations) { } } + opensearch_distributions { Architecture.values().each { eachArchitecture -> "docker${ eachArchitecture == Architecture.AARCH64 ? '_aarch64' : '' }" { @@ -179,7 +180,7 @@ void addBuildDockerImage(Architecture architecture, DockerBase base) { dockerContext.fileProvider(copyContextTask.map { it.destinationDir }) baseImages = [ base.getImage() ] - String version = VersionProperties.opensearch + String version = VersionProperties.getOpenSearch() tags = [ //TODO remove the tag and replace with OpenSearch docker tag "docker.elastic.co/elasticsearch/elasticsearch-oss:${version}", @@ -226,7 +227,7 @@ subprojects { Project subProject -> final String exportTaskName = taskName("export", architecture, base, "DockerImage") final String buildTaskName = taskName("build", architecture, base, "DockerImage") - final String tarFile = "${parent.projectDir}/build/${artifactName}_${VersionProperties.opensearch}.${extension}" + final String tarFile = "${parent.projectDir}/build/${artifactName}_${VersionProperties.getOpenSearch()}.${extension}" tasks.register(exportTaskName, LoggedExec) { inputs.file("${parent.projectDir}/build/markers/${buildTaskName}.marker") diff --git a/modules/aggs-matrix-stats/build.gradle b/modules/aggs-matrix-stats/build.gradle index 90405283819..2fd38b0a098 100644 --- a/modules/aggs-matrix-stats/build.gradle +++ b/modules/aggs-matrix-stats/build.gradle @@ -18,7 +18,7 @@ */ apply plugin: 'opensearch.yaml-rest-test' -esplugin { +opensearchplugin { description 'Adds aggregations whose input are a list of numeric fields and output includes a matrix.' classname 'org.opensearch.search.aggregations.matrix.MatrixAggregationPlugin' hasClientJar = true diff --git a/modules/analysis-common/build.gradle b/modules/analysis-common/build.gradle index 3cae9c00d79..1682283e308 100644 --- a/modules/analysis-common/build.gradle +++ b/modules/analysis-common/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'Adds "built in" analyzers to OpenSearch.' classname 'org.opensearch.analysis.common.CommonAnalysisPlugin' extendedPlugins = ['lang-painless'] diff --git a/modules/geo/build.gradle b/modules/geo/build.gradle index a4e60ae270e..fc9b6510f15 100644 --- a/modules/geo/build.gradle +++ b/modules/geo/build.gradle @@ -18,7 +18,7 @@ */ apply plugin: 'opensearch.yaml-rest-test' -esplugin { +opensearchplugin { description 'Placeholder plugin for geospatial features in OpenSearch. only registers geo_shape field mapper for now' classname 'org.opensearch.geo.GeoPlugin' } diff --git a/modules/ingest-common/build.gradle b/modules/ingest-common/build.gradle index 6ea21ea0abe..c484a917d47 100644 --- a/modules/ingest-common/build.gradle +++ b/modules/ingest-common/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'Module for ingest processors that do not require additional security permissions or have large dependencies and resources' classname 'org.opensearch.ingest.common.IngestCommonPlugin' extendedPlugins = ['lang-painless'] diff --git a/modules/ingest-geoip/build.gradle b/modules/ingest-geoip/build.gradle index fcc870062ed..2c584849130 100644 --- a/modules/ingest-geoip/build.gradle +++ b/modules/ingest-geoip/build.gradle @@ -22,7 +22,7 @@ import org.apache.tools.ant.taskdefs.condition.Os apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'Ingest processor that uses looksup geo data based on ip adresses using the Maxmind geo database' classname 'org.opensearch.ingest.geoip.IngestGeoIpPlugin' } @@ -34,7 +34,7 @@ dependencies { api("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}") api('com.maxmind.db:maxmind-db:1.3.1') - testImplementation 'org.opensearch:geolite2-databases:20191119' + testImplementation 'org.elasticsearch:geolite2-databases:20191119' } restResources { diff --git a/modules/ingest-user-agent/build.gradle b/modules/ingest-user-agent/build.gradle index 6a43e13bc44..ee3efd90355 100644 --- a/modules/ingest-user-agent/build.gradle +++ b/modules/ingest-user-agent/build.gradle @@ -18,7 +18,7 @@ */ apply plugin: 'opensearch.yaml-rest-test' -esplugin { +opensearchplugin { description 'Ingest processor that extracts information from a user agent' classname 'org.opensearch.ingest.useragent.IngestUserAgentPlugin' } diff --git a/modules/lang-expression/build.gradle b/modules/lang-expression/build.gradle index 1ae6f2ecae4..8a36ac4db0f 100644 --- a/modules/lang-expression/build.gradle +++ b/modules/lang-expression/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'Lucene expressions integration for OpenSearch' classname 'org.opensearch.script.expression.ExpressionPlugin' } diff --git a/modules/lang-mustache/build.gradle b/modules/lang-mustache/build.gradle index d41f34fc591..e1c819ae93a 100644 --- a/modules/lang-mustache/build.gradle +++ b/modules/lang-mustache/build.gradle @@ -20,7 +20,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.java-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'Mustache scripting integration for OpenSearch' classname 'org.opensearch.script.mustache.MustachePlugin' hasClientJar = true // For the template apis and query diff --git a/modules/lang-painless/build.gradle b/modules/lang-painless/build.gradle index 26fbeffd6c8..6c68c722e75 100644 --- a/modules/lang-painless/build.gradle +++ b/modules/lang-painless/build.gradle @@ -21,7 +21,7 @@ import org.opensearch.gradle.testclusters.DefaultTestClustersTask; apply plugin: 'opensearch.validate-rest-spec' apply plugin: 'opensearch.yaml-rest-test' -esplugin { +opensearchplugin { description 'An easy, safe and fast scripting language for OpenSearch' classname 'org.opensearch.painless.PainlessPlugin' } diff --git a/modules/mapper-extras/build.gradle b/modules/mapper-extras/build.gradle index 190a64cc702..60728471ce8 100644 --- a/modules/mapper-extras/build.gradle +++ b/modules/mapper-extras/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.java-rest-test' -esplugin { +opensearchplugin { description 'Adds advanced field mappers' classname 'org.opensearch.index.mapper.MapperExtrasPlugin' hasClientJar = true diff --git a/modules/opensearch-dashboards/build.gradle b/modules/opensearch-dashboards/build.gradle index bc1e267d09f..d4c98b39f3c 100644 --- a/modules/opensearch-dashboards/build.gradle +++ b/modules/opensearch-dashboards/build.gradle @@ -18,7 +18,7 @@ */ apply plugin: 'opensearch.java-rest-test' -esplugin { +opensearchplugin { description 'Plugin exposing APIs for OpenSearch Dashboards system indices' classname 'org.opensearch.dashboards.OpenSearchDashboardsPlugin' } diff --git a/modules/parent-join/build.gradle b/modules/parent-join/build.gradle index b4847e60aef..96016ee86fb 100644 --- a/modules/parent-join/build.gradle +++ b/modules/parent-join/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'This module adds the support parent-child queries and aggregations' classname 'org.opensearch.join.ParentJoinPlugin' hasClientJar = true diff --git a/modules/percolator/build.gradle b/modules/percolator/build.gradle index 1d9a650cf66..43dc75d8eb0 100644 --- a/modules/percolator/build.gradle +++ b/modules/percolator/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'Percolator module adds capability to index queries and query these queries by specifying documents' classname 'org.opensearch.percolator.PercolatorPlugin' hasClientJar = true diff --git a/modules/rank-eval/build.gradle b/modules/rank-eval/build.gradle index 837c7a0339a..32a1578b162 100644 --- a/modules/rank-eval/build.gradle +++ b/modules/rank-eval/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'The Rank Eval module adds APIs to evaluate ranking quality.' classname 'org.opensearch.index.rankeval.RankEvalPlugin' hasClientJar = true diff --git a/modules/reindex/build.gradle b/modules/reindex/build.gradle index 0207bf9879e..cb85fc64f55 100644 --- a/modules/reindex/build.gradle +++ b/modules/reindex/build.gradle @@ -28,7 +28,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.java-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'The Reindex module adds APIs to reindex from one index to another or update documents in place.' classname 'org.opensearch.index.reindex.ReindexPlugin' hasClientJar = true @@ -90,7 +90,7 @@ configurations { } dependencies { - oldesFixture project(':test:fixtures:old-opensearch') + oldesFixture project(':test:fixtures:old-elasticsearch') /* Right now we just test against the latest version of each major we expect * reindex-from-remote to work against. We could randomize the versions but * that doesn't seem worth it at this point. */ diff --git a/modules/repository-url/build.gradle b/modules/repository-url/build.gradle index 43e9726f27e..007e9aa4310 100644 --- a/modules/repository-url/build.gradle +++ b/modules/repository-url/build.gradle @@ -25,7 +25,7 @@ apply plugin: 'opensearch.yaml-rest-test' apply plugin: 'opensearch.internal-cluster-test' -esplugin { +opensearchplugin { description 'Module for URL repository' classname 'org.opensearch.plugin.repository.url.URLRepositoryPlugin' } diff --git a/modules/systemd/build.gradle b/modules/systemd/build.gradle index 7dc7807cf1a..f481f20d66b 100644 --- a/modules/systemd/build.gradle +++ b/modules/systemd/build.gradle @@ -17,7 +17,7 @@ * under the License. */ -esplugin { +opensearchplugin { description 'Integrates OpenSearch with systemd' classname 'org.opensearch.systemd.SystemdPlugin' } diff --git a/modules/transport-netty4/build.gradle b/modules/transport-netty4/build.gradle index b4e69b39d78..151eb70652a 100644 --- a/modules/transport-netty4/build.gradle +++ b/modules/transport-netty4/build.gradle @@ -33,7 +33,7 @@ apply plugin: 'opensearch.internal-cluster-test' * fix the hack in the build framework that copies transport-netty4 into the integ test cluster * maybe figure out a way to run all tests from core with netty4/network? */ -esplugin { +opensearchplugin { description 'Netty 4 based transport implementation' classname 'org.opensearch.transport.Netty4Plugin' hasClientJar = true diff --git a/plugins/analysis-phonetic/build.gradle b/plugins/analysis-phonetic/build.gradle index 30cb5b06b0d..8201e1f0173 100644 --- a/plugins/analysis-phonetic/build.gradle +++ b/plugins/analysis-phonetic/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'opensearch.yaml-rest-test' opensearchplugin { - description 'The Phonetic Analysis plugin integrates phonetic token filter analysis with elasticsearch.' + description 'The Phonetic Analysis plugin integrates phonetic token filter analysis with opensearch.' classname 'org.opensearch.plugin.analysis.AnalysisPhoneticPlugin' } diff --git a/plugins/repository-hdfs/build.gradle b/plugins/repository-hdfs/build.gradle index c4b2e20c662..300e9f35dfd 100644 --- a/plugins/repository-hdfs/build.gradle +++ b/plugins/repository-hdfs/build.gradle @@ -157,7 +157,7 @@ Set disabledIntegTestTaskNames = [] for (String integTestTaskName : ['integTestHa', 'integTestSecure', 'integTestSecureHa']) { task "${integTestTaskName}"(type: RestIntegTestTask) { - description = "Runs rest tests against an elasticsearch cluster with HDFS." + description = "Runs rest tests against an opensearch cluster with HDFS." dependsOn(project.bundlePlugin) if (disabledIntegTestTaskNames.contains(integTestTaskName)) { diff --git a/qa/die-with-dignity/build.gradle b/qa/die-with-dignity/build.gradle index 6992f57b31d..6fc06cb5672 100644 --- a/qa/die-with-dignity/build.gradle +++ b/qa/die-with-dignity/build.gradle @@ -2,9 +2,9 @@ import org.opensearch.gradle.info.BuildParams import org.opensearch.gradle.util.GradleUtils apply plugin: 'opensearch.java-rest-test' -apply plugin: 'opensearch.esplugin' +apply plugin: 'opensearch.opensearchplugin' -esplugin { +opensearchplugin { description 'Die with dignity plugin' classname 'org.opensearch.DieWithDignityPlugin' } diff --git a/qa/os/build.gradle b/qa/os/build.gradle index e09b86e23a7..c9626900bb2 100644 --- a/qa/os/build.gradle +++ b/qa/os/build.gradle @@ -18,7 +18,7 @@ */ plugins { - id 'elasticsearch.distro-test' + id 'opensearch.distro-test' } dependencies { @@ -35,7 +35,7 @@ dependencies { api "commons-codec:commons-codec:${versions.commonscodec}" api "commons-logging:commons-logging:${versions.commonslogging}" - api project(':libs:elasticsearch-core') + api project(':libs:opensearch-core') testImplementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" testImplementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" diff --git a/qa/remote-clusters/build.gradle b/qa/remote-clusters/build.gradle index 799c5017e1f..fb052b44bc7 100644 --- a/qa/remote-clusters/build.gradle +++ b/qa/remote-clusters/build.gradle @@ -31,7 +31,11 @@ dependencies { testImplementation project(':client:rest-high-level') } -elasticsearch_distributions { +/** + * TODO OpenSearch - this task is currently broken and temporarily commented out to + * unblock the pre-commit. + * Issue URL - https://github.com/opensearch-project/OpenSearch/issues/400 +opensearch_distributions { docker { type = 'docker' architecture = Architecture.current() @@ -41,7 +45,7 @@ elasticsearch_distributions { } preProcessFixture { - dependsOn elasticsearch_distributions.docker + dependsOn opensearch_distributions.docker doLast { // tests expect to have an empty repo project.delete( @@ -58,7 +62,7 @@ preProcessFixture { ) } } - +*/ dockerCompose { tcpPortsToIgnoreWhenWaiting = [9600, 9601] useComposeFiles = ['docker-compose-oss.yml'] diff --git a/qa/wildfly/build.gradle b/qa/wildfly/build.gradle index 9f16cce1fe0..5c3d6090a27 100644 --- a/qa/wildfly/build.gradle +++ b/qa/wildfly/build.gradle @@ -53,7 +53,11 @@ war { archiveFileName = 'example-app.war' } -elasticsearch_distributions { +/** + * TODO OpenSearch - this task is currently broken and temporarily commented out to + * unblock the pre-commit. + * Issue URL - https://github.com/opensearch-project/OpenSearch/issues/400 +opensearch_distributions { docker { type = 'docker' architecture = Architecture.current() @@ -63,9 +67,9 @@ elasticsearch_distributions { } preProcessFixture { - dependsOn war, elasticsearch_distributions.docker + dependsOn war, opensearch_distributions.docker } - +*/ dockerCompose { useComposeFiles = ['docker-compose-oss.yml'] } diff --git a/rest-api-spec/build.gradle b/rest-api-spec/build.gradle index a8fed883c2d..5503498da98 100644 --- a/rest-api-spec/build.gradle +++ b/rest-api-spec/build.gradle @@ -1,8 +1,8 @@ -apply plugin: 'elasticsearch.build' -apply plugin: 'elasticsearch.publish' -apply plugin: 'elasticsearch.rest-resources' -apply plugin: 'elasticsearch.validate-rest-spec' -apply plugin: 'elasticsearch.yaml-rest-test' +apply plugin: 'opensearch.build' +apply plugin: 'opensearch.publish' +apply plugin: 'opensearch.rest-resources' +apply plugin: 'opensearch.validate-rest-spec' +apply plugin: 'opensearch.yaml-rest-test' restResources { restTests { diff --git a/server/build.gradle b/server/build.gradle index 86300311fe7..da9a56fcd95 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -121,7 +121,7 @@ dependencies { api "org.apache.logging.log4j:log4j-core:${versions.log4j}", optional // repackaged jna with native bits linked against all supported platforms - api "org.opensearch:jna:${versions.jna}" + api "org.elasticsearch:jna:${versions.jna}" testImplementation(project(":test:framework")) { // tests use the locally compiled version of server diff --git a/settings.gradle b/settings.gradle index 1140e27164a..1bda87ce59a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,7 +2,7 @@ plugins { id "com.gradle.enterprise" version "3.5" } -rootProject.name = "elasticsearch" +rootProject.name = "OpenSearch" List projects = [ 'build-tools', @@ -103,14 +103,14 @@ project(':build-tools').projectDir = new File(rootProject.projectDir, 'buildSrc' project(':build-tools:reaper').projectDir = new File(rootProject.projectDir, 'buildSrc/reaper') project(":libs").children.each { libsProject -> - libsProject.name = "elasticsearch-${libsProject.name}" + libsProject.name = "opensearch-${libsProject.name}" } project(":test:external-modules").children.each { testProject -> testProject.name = "test-${testProject.name}" } -// look for extra plugins for elasticsearch +// look for extra plugins for opensearch File extraProjects = new File(rootProject.projectDir.parentFile, "${rootProject.projectDir.name}-extra") if (extraProjects.exists()) { for (File extraProjectDir : extraProjects.listFiles()) { diff --git a/test/external-modules/build.gradle b/test/external-modules/build.gradle index e1d2720fab6..ddd700c4ded 100644 --- a/test/external-modules/build.gradle +++ b/test/external-modules/build.gradle @@ -1,11 +1,11 @@ -import org.elasticsearch.gradle.info.BuildParams; +import org.opensearch.gradle.info.BuildParams; subprojects { - apply plugin: 'opensearch.esplugin' + apply plugin: 'opensearch.opensearchplugin' apply plugin: 'opensearch.yaml-rest-test' - esplugin { + opensearchplugin { name it.name licenseFile rootProject.file('licenses/APACHE-LICENSE-2.0.txt') noticeFile rootProject.file('NOTICE.txt') diff --git a/test/external-modules/delayed-aggs/build.gradle b/test/external-modules/delayed-aggs/build.gradle index cc867e50041..a81b171e223 100644 --- a/test/external-modules/delayed-aggs/build.gradle +++ b/test/external-modules/delayed-aggs/build.gradle @@ -17,7 +17,7 @@ * under the License. */ -esplugin { +opensearchplugin { description 'A test module that allows to delay aggregations on shards with a configurable time' classname 'org.opensearch.search.aggregations.DelayedShardAggregationPlugin' } diff --git a/test/framework/build.gradle b/test/framework/build.gradle index a3197311ec7..13737c30ff0 100644 --- a/test/framework/build.gradle +++ b/test/framework/build.gradle @@ -34,8 +34,8 @@ dependencies { api "org.apache.lucene:lucene-codecs:${versions.lucene}" api "commons-logging:commons-logging:${versions.commonslogging}" api "commons-codec:commons-codec:${versions.commonscodec}" - api "org.opensearch:securemock:${versions.securemock}" - api "org.opensearch:mocksocket:${versions.mocksocket}" + api "org.elasticsearch:securemock:${versions.securemock}" + api "org.elasticsearch:mocksocket:${versions.mocksocket}" } compileJava.options.compilerArgs << '-Xlint:-cast,-rawtypes,-unchecked'