Browse Source

Use directory name as project name for libs (#115720) (#115984)

* Use directory name as project name for libs (#115720)

The libs projects are configured to all begin with `elasticsearch-`.
While this is desireable for the artifacts to contain this consistent
prefix, it means the project names don't match up with their
directories. Additionally, it creates complexities for subproject naming
that must be manually adjusted.

This commit adjusts the project names for those under libs to be their
directory names. The resulting artifacts for these libs are kept the
same, all beginning with `elasticsearch-`.

* fixes
Ryan Ernst 11 months ago
parent
commit
dedf9fd6d7
67 changed files with 169 additions and 139 deletions
  1. 3 3
      benchmarks/build.gradle
  2. 1 1
      build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/PublishPluginFuncTest.groovy
  3. 1 1
      build-tools-internal/src/main/groovy/elasticsearch.ide.gradle
  4. 3 3
      build-tools-internal/src/main/groovy/elasticsearch.stable-api.gradle
  5. 1 1
      build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java
  6. 10 3
      build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionBwcSetupPlugin.java
  7. 2 2
      build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/JarHellPrecommitPlugin.java
  8. 1 1
      build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ThirdPartyAuditPrecommitPlugin.java
  9. 1 1
      build-tools/src/testFixtures/groovy/org/elasticsearch/gradle/fixtures/AbstractGradleFuncTest.groovy
  10. 1 1
      client/rest/build.gradle
  11. 1 1
      client/sniffer/build.gradle
  12. 1 1
      client/test/build.gradle
  13. 2 2
      distribution/build.gradle
  14. 1 1
      distribution/tools/entitlement-agent/build.gradle
  15. 2 1
      distribution/tools/entitlement-runtime/build.gradle
  16. 2 2
      distribution/tools/geoip-cli/build.gradle
  17. 1 1
      distribution/tools/keystore-cli/build.gradle
  18. 3 3
      distribution/tools/plugin-cli/build.gradle
  19. 1 1
      distribution/tools/server-cli/build.gradle
  20. 1 1
      distribution/tools/windows-service-cli/build.gradle
  21. 36 4
      libs/build.gradle
  22. 2 2
      libs/cli/build.gradle
  23. 3 3
      libs/core/build.gradle
  24. 1 1
      libs/dissect/build.gradle
  25. 1 1
      libs/geo/build.gradle
  26. 1 1
      libs/grok/build.gradle
  27. 2 2
      libs/h3/build.gradle
  28. 2 2
      libs/logging/build.gradle
  29. 3 3
      libs/logstash-bridge/build.gradle
  30. 2 2
      libs/lz4/build.gradle
  31. 4 4
      libs/native/build.gradle
  32. 3 3
      libs/native/jna/build.gradle
  33. 2 2
      libs/plugin-analysis-api/build.gradle
  34. 4 4
      libs/plugin-scanner/build.gradle
  35. 1 1
      libs/secure-sm/build.gradle
  36. 3 3
      libs/simdvec/build.gradle
  37. 2 2
      libs/ssl-config/build.gradle
  38. 2 2
      libs/tdigest/build.gradle
  39. 3 3
      libs/x-content/build.gradle
  40. 3 3
      libs/x-content/impl/build.gradle
  41. 2 2
      modules/ingest-common/build.gradle
  42. 1 1
      modules/reindex/build.gradle
  43. 2 2
      modules/runtime-fields-common/build.gradle
  44. 1 1
      modules/systemd/build.gradle
  45. 2 2
      modules/transport-netty4/build.gradle
  46. 1 1
      qa/logging-config/build.gradle
  47. 1 1
      qa/packaging/build.gradle
  48. 13 13
      server/build.gradle
  49. 1 11
      settings.gradle
  50. 1 1
      test/external-modules/apm-integration/build.gradle
  51. 2 2
      test/fixtures/geoip-fixture/build.gradle
  52. 2 2
      test/framework/build.gradle
  53. 1 1
      test/x-content/build.gradle
  54. 1 1
      x-pack/plugin/blob-cache/build.gradle
  55. 2 2
      x-pack/plugin/core/build.gradle
  56. 2 2
      x-pack/plugin/esql/build.gradle
  57. 2 2
      x-pack/plugin/esql/qa/testFixtures/build.gradle
  58. 1 1
      x-pack/plugin/inference/build.gradle
  59. 1 1
      x-pack/plugin/ml-package-loader/build.gradle
  60. 1 1
      x-pack/plugin/ml/build.gradle
  61. 1 1
      x-pack/plugin/searchable-snapshots/build.gradle
  62. 1 1
      x-pack/plugin/spatial/build.gradle
  63. 3 3
      x-pack/plugin/sql/sql-action/build.gradle
  64. 1 1
      x-pack/plugin/sql/sql-cli/build.gradle
  65. 2 2
      x-pack/plugin/sql/sql-proto/build.gradle
  66. 1 1
      x-pack/plugin/text-structure/build.gradle
  67. 1 1
      x-pack/plugin/transform/qa/common/build.gradle

+ 3 - 3
benchmarks/build.gradle

@@ -40,15 +40,15 @@ dependencies {
     // us to invoke the JMH uberjar as usual.
     exclude group: 'net.sf.jopt-simple', module: 'jopt-simple'
   }
-  api(project(':libs:elasticsearch-h3'))
+  api(project(':libs:h3'))
   api(project(':modules:aggregations'))
   api(project(':x-pack:plugin:esql-core'))
   api(project(':x-pack:plugin:esql'))
   api(project(':x-pack:plugin:esql:compute'))
-  implementation project(path: ':libs:elasticsearch-simdvec')
+  implementation project(path: ':libs:simdvec')
   expression(project(path: ':modules:lang-expression', configuration: 'zip'))
   painless(project(path: ':modules:lang-painless', configuration: 'zip'))
-  nativeLib(project(':libs:elasticsearch-native'))
+  nativeLib(project(':libs:native'))
   api "org.openjdk.jmh:jmh-core:$versions.jmh"
   annotationProcessor "org.openjdk.jmh:jmh-generator-annprocess:$versions.jmh"
   // Dependencies of JMH

+ 1 - 1
build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/PublishPluginFuncTest.groovy

@@ -18,7 +18,7 @@ class PublishPluginFuncTest extends AbstractGradleFuncTest {
 
     def setup() {
         // required for JarHell to work
-        subProject(":libs:elasticsearch-core") << "apply plugin:'java'"
+        subProject(":libs:core") << "apply plugin:'java'"
 
         configurationCacheCompatible = false
     }

+ 1 - 1
build-tools-internal/src/main/groovy/elasticsearch.ide.gradle

@@ -131,7 +131,7 @@ if (providers.systemProperty('idea.active').getOrNull() == 'true') {
       ':server:generateModulesList',
       ':server:generatePluginsList',
       ':generateProviderImpls',
-      ':libs:elasticsearch-native:elasticsearch-native-libraries:extractLibs',
+      ':libs:native:native-libraries:extractLibs',
       ':x-pack:libs:es-opensaml-security-api:shadowJar'].collect { elasticsearchProject.right()?.task(it) ?: it })
   }
 

+ 3 - 3
build-tools-internal/src/main/groovy/elasticsearch.stable-api.gradle

@@ -33,12 +33,12 @@ BuildParams.bwcVersions.withIndexCompatible({ it.onOrAfter(Version.fromString(ex
     if (unreleasedVersion) {
       // For unreleased snapshot versions, build them from source
       "oldJar${baseName}"(files(project(unreleasedVersion.gradleProjectPath).tasks.named(buildBwcTaskName(project.name))))
-    } else if(bwcVersion.onOrAfter('8.7.0') && project.name.endsWith("elasticsearch-logging")==false) {
+    } else if(bwcVersion.onOrAfter('8.7.0') && project.name.endsWith("logging")==false) {
       //there was a package rename in 8.7.0, except for es-logging
-      "oldJar${baseName}"("org.elasticsearch.plugin:${project.name}:${bwcVersion}")
+      "oldJar${baseName}"("org.elasticsearch.plugin:elasticsearch-${project.name}:${bwcVersion}")
     } else {
       // For released versions, download it
-      "oldJar${baseName}"("org.elasticsearch:${project.name}:${bwcVersion}")
+      "oldJar${baseName}"("org.elasticsearch:elasticsearch-${project.name}:${bwcVersion}")
     }
   }
 

+ 1 - 1
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaBasePlugin.java

@@ -177,7 +177,7 @@ public class ElasticsearchJavaBasePlugin implements Plugin<Project> {
     }
 
     private static void configureNativeLibraryPath(Project project) {
-        String nativeProject = ":libs:elasticsearch-native:elasticsearch-native-libraries";
+        String nativeProject = ":libs:native:native-libraries";
         Configuration nativeConfig = project.getConfigurations().create("nativeLibs");
         nativeConfig.defaultDependencies(deps -> {
             deps.add(project.getDependencies().project(Map.of("path", nativeProject, "configuration", "default")));

+ 10 - 3
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionBwcSetupPlugin.java

@@ -165,7 +165,12 @@ public class InternalDistributionBwcSetupPlugin implements Plugin<Project> {
             DistributionProjectArtifact stableAnalysisPluginProjectArtifact = new DistributionProjectArtifact(
                 new File(
                     checkoutDir.get(),
-                    relativeDir + "/build/distributions/" + stableApiProject.getName() + "-" + bwcVersion.get() + "-SNAPSHOT.jar"
+                    relativeDir
+                        + "/build/distributions/elasticsearch-"
+                        + stableApiProject.getName()
+                        + "-"
+                        + bwcVersion.get()
+                        + "-SNAPSHOT.jar"
                 ),
                 null
             );
@@ -275,7 +280,7 @@ public class InternalDistributionBwcSetupPlugin implements Plugin<Project> {
     }
 
     private static List<Project> resolveStableProjects(Project project) {
-        Set<String> stableProjectNames = Set.of("elasticsearch-logging", "elasticsearch-plugin-api", "elasticsearch-plugin-analysis-api");
+        Set<String> stableProjectNames = Set.of("logging", "plugin-api", "plugin-analysis-api");
         return project.findProject(":libs")
             .getSubprojects()
             .stream()
@@ -312,7 +317,9 @@ public class InternalDistributionBwcSetupPlugin implements Plugin<Project> {
                 c.getOutputs().files(expectedOutputFile);
             }
             c.getOutputs().doNotCacheIf("BWC distribution caching is disabled for local builds", task -> BuildParams.isCi() == false);
-            c.getArgs().add(projectPath.replace('/', ':') + ":" + assembleTaskName);
+            c.getArgs().add("-p");
+            c.getArgs().add(projectPath);
+            c.getArgs().add(assembleTaskName);
             if (project.getGradle().getStartParameter().isBuildCacheEnabled()) {
                 c.getArgs().add("--build-cache");
             }

+ 2 - 2
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/JarHellPrecommitPlugin.java

@@ -21,11 +21,11 @@ public class JarHellPrecommitPlugin extends PrecommitPlugin {
     public TaskProvider<? extends Task> createTask(Project project) {
         project.getPluginManager().apply(JarHellPlugin.class);
 
-        if (project.getPath().equals(":libs:elasticsearch-core") == false) {
+        if (project.getPath().equals(":libs:core") == false) {
             // ideally we would configure this as a default dependency. But Default dependencies do not work correctly
             // with gradle project dependencies as they're resolved to late in the build and don't setup according task
             // dependencies properly
-            var elasticsearchCoreProject = project.findProject(":libs:elasticsearch-core");
+            var elasticsearchCoreProject = project.findProject(":libs:core");
             if (elasticsearchCoreProject != null) {
                 project.getDependencies().add("jarHell", elasticsearchCoreProject);
             }

+ 1 - 1
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ThirdPartyAuditPrecommitPlugin.java

@@ -27,7 +27,7 @@ import static org.elasticsearch.gradle.internal.util.DependenciesUtils.createFil
 public class ThirdPartyAuditPrecommitPlugin extends PrecommitPlugin {
 
     public static final String JDK_JAR_HELL_CONFIG_NAME = "jdkJarHell";
-    public static final String LIBS_ELASTICSEARCH_CORE_PROJECT_PATH = ":libs:elasticsearch-core";
+    public static final String LIBS_ELASTICSEARCH_CORE_PROJECT_PATH = ":libs:core";
 
     @Override
     public TaskProvider<? extends Task> createTask(Project project) {

+ 1 - 1
build-tools/src/testFixtures/groovy/org/elasticsearch/gradle/fixtures/AbstractGradleFuncTest.groovy

@@ -56,7 +56,7 @@ abstract class AbstractGradleFuncTest extends Specification {
         propertiesFile <<
             "org.gradle.java.installations.fromEnv=JAVA_HOME,RUNTIME_JAVA_HOME,JAVA15_HOME,JAVA14_HOME,JAVA13_HOME,JAVA12_HOME,JAVA11_HOME,JAVA8_HOME"
 
-        def nativeLibsProject = subProject(":libs:elasticsearch-native:elasticsearch-native-libraries")
+        def nativeLibsProject = subProject(":libs:native:native-libraries")
         nativeLibsProject << """
             plugins {
                 id 'base'

+ 1 - 1
client/rest/build.gradle

@@ -79,7 +79,7 @@ tasks.named('forbiddenApisTest').configure {
 }
 
 // JarHell is part of es server, which we don't want to pull in
-// TODO: Not anymore. Now in :libs:elasticsearch-core
+// TODO: Not anymore. Now in :libs:core
 tasks.named("jarHell").configure {
   enabled = false
 }

+ 1 - 1
client/sniffer/build.gradle

@@ -73,7 +73,7 @@ tasks.named("dependencyLicenses").configure {
 }
 
 // JarHell is part of es server, which we don't want to pull in
-// TODO: Not anymore. Now in :libs:elasticsearch-core
+// TODO: Not anymore. Now in :libs:core
 tasks.named("jarHell").configure { enabled = false }
 
 tasks.named("testTestingConventions").configure {

+ 1 - 1
client/test/build.gradle

@@ -54,7 +54,7 @@ tasks.named('forbiddenApisTest').configure {
 tasks.named("thirdPartyAudit").configure { enabled = false }
 
 // JarHell is part of es server, which we don't want to pull in
-// TODO: Not anymore. Now in :libs:elasticsearch-core
+// TODO: Not anymore. Now in :libs:core
 tasks.named("jarHell").configure { enabled = false }
 
 // TODO: should we have licenses for our test deps?

+ 2 - 2
distribution/build.gradle

@@ -275,7 +275,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
     }
     all {
       resolutionStrategy.dependencySubstitution {
-        substitute module("org.apache.logging.log4j:log4j-core") using project(":libs:elasticsearch-log4j") because "patched to remove JndiLookup clas"}
+        substitute module("org.apache.logging.log4j:log4j-core") using project(":libs:log4j") because "patched to remove JndiLookup clas"}
     }
   }
 
@@ -291,7 +291,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
     libsKeystoreCli project(path: ':distribution:tools:keystore-cli')
     libsSecurityCli project(':x-pack:plugin:security:cli')
     libsGeoIpCli project(':distribution:tools:geoip-cli')
-    libsNative project(':libs:elasticsearch-native:elasticsearch-native-libraries')
+    libsNative project(':libs:native:native-libraries')
   }
 
   project.ext {

+ 1 - 1
distribution/tools/entitlement-agent/build.gradle

@@ -22,7 +22,7 @@ configurations {
 
 dependencies {
   entitlementBridge project(":distribution:tools:entitlement-bridge")
-  compileOnly project(":libs:elasticsearch-core")
+  compileOnly project(":libs:core")
   compileOnly project(":distribution:tools:entitlement-runtime")
   testImplementation project(":test:framework")
   testImplementation project(":distribution:tools:entitlement-bridge")

+ 2 - 1
distribution/tools/entitlement-runtime/build.gradle

@@ -10,7 +10,8 @@ apply plugin: 'elasticsearch.build'
 apply plugin: 'elasticsearch.publish'
 
 dependencies {
-  compileOnly project(':libs:elasticsearch-core') // For @SuppressForbidden
+  compileOnly project(':libs:core') // For @SuppressForbidden
+  compileOnly project(":libs:x-content") // for parsing policy files
   compileOnly project(':server') // To access the main server module for special permission checks
   compileOnly project(':distribution:tools:entitlement-bridge')
 

+ 2 - 2
distribution/tools/geoip-cli/build.gradle

@@ -15,8 +15,8 @@ base {
 
 dependencies {
   compileOnly project(":server")
-  compileOnly project(":libs:elasticsearch-cli")
-  compileOnly project(":libs:elasticsearch-x-content")
+  compileOnly project(":libs:cli")
+  compileOnly project(":libs:x-content")
   testImplementation project(":test:framework")
   testImplementation "org.apache.commons:commons-compress:1.26.1"
   testImplementation "commons-io:commons-io:2.15.1"

+ 1 - 1
distribution/tools/keystore-cli/build.gradle

@@ -11,7 +11,7 @@ apply plugin: 'elasticsearch.build'
 
 dependencies {
   compileOnly project(":server")
-  compileOnly project(":libs:elasticsearch-cli")
+  compileOnly project(":libs:cli")
   testImplementation project(":test:framework")
   testImplementation "com.google.jimfs:jimfs:${versions.jimfs}"
   testRuntimeOnly "com.google.guava:guava:${versions.jimfs_guava}"

+ 3 - 3
distribution/tools/plugin-cli/build.gradle

@@ -21,9 +21,9 @@ tasks.named("dependencyLicenses").configure {
 
 dependencies {
   compileOnly project(":server")
-  compileOnly project(":libs:elasticsearch-cli")
-  implementation project(":libs:elasticsearch-plugin-api")
-  implementation project(":libs:elasticsearch-plugin-scanner")
+  compileOnly project(":libs:cli")
+  implementation project(":libs:plugin-api")
+  implementation project(":libs:plugin-scanner")
   // TODO: asm is picked up from the plugin scanner, we should consolidate so it is not defined twice
   implementation 'org.ow2.asm:asm:9.7'
   implementation 'org.ow2.asm:asm-tree:9.7'

+ 1 - 1
distribution/tools/server-cli/build.gradle

@@ -12,7 +12,7 @@ apply plugin: 'elasticsearch.build'
 
 dependencies {
   compileOnly project(":server")
-  compileOnly project(":libs:elasticsearch-cli")
+  compileOnly project(":libs:cli")
 
   testImplementation project(":test:framework")
 }

+ 1 - 1
distribution/tools/windows-service-cli/build.gradle

@@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.build'
 
 dependencies {
   compileOnly project(":server")
-  compileOnly project(":libs:elasticsearch-cli")
+  compileOnly project(":libs:cli")
   compileOnly project(":distribution:tools:server-cli")
 
   testImplementation project(":test:framework")

+ 36 - 4
libs/build.gradle

@@ -7,10 +7,42 @@
  * License v3.0 only", or the "Server Side Public License, v 1".
  */
 
-configure(childProjects.values() - project('elasticsearch-log4j')) {
+configure(childProjects.values()) {
+
+  apply plugin: 'base'
+
   /*
-   * All subprojects are java projects using Elasticsearch's standard build
-   * tools.
+   * Although these libs are local to Elasticsearch, they can conflict with other similarly
+   * named libraries when downloaded into a single directory via maven. Here we set the
+   * name of all libs to begin with the "elasticsearch-" prefix. Additionally, subprojects
+   * of libs begin with their parents artifactId.
    */
-  apply plugin: 'elasticsearch.build'
+  def baseProject = project
+  def baseArtifactId = "elasticsearch-${it.name}"
+  base {
+    archivesName = baseArtifactId
+  }
+  subprojects {
+    apply plugin: 'base'
+
+    def subArtifactId = baseArtifactId
+    def currentProject = project
+    while (currentProject != baseProject) {
+      subArtifactId += "-${currentProject.name}"
+      currentProject = currentProject.parent
+    }
+    base {
+      archivesName = subArtifactId
+    }
+  }
+
+  // log4j is a hack, and not really a full elasticsearch built jar
+  if (project.name != 'log4j') {
+
+    /*
+     * All subprojects are java projects using Elasticsearch's standard build
+     * tools.
+     */
+    apply plugin: 'elasticsearch.build'
+  }
 }

+ 2 - 2
libs/cli/build.gradle

@@ -11,10 +11,10 @@ apply plugin: 'elasticsearch.publish'
 
 dependencies {
   api 'net.sf.jopt-simple:jopt-simple:5.0.2'
-  api project(':libs:elasticsearch-core')
+  api project(':libs:core')
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-cli'
+    exclude group: 'org.elasticsearch', module: 'cli'
   }
 }
 

+ 3 - 3
libs/core/build.gradle

@@ -13,19 +13,19 @@ apply plugin: 'elasticsearch.mrjar'
 dependencies {
   // This dependency is used only by :libs:core for null-checking interop with other tools
   compileOnly "com.google.code.findbugs:jsr305:3.0.2"
-  compileOnly project(':libs:elasticsearch-logging')
+  compileOnly project(':libs:logging')
 
   testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
   testImplementation "junit:junit:${versions.junit}"
   testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-core'
+    exclude group: 'org.elasticsearch', module: 'core'
   }
 }
 
 tasks.named('forbiddenApisMain').configure {
-  // :libs:elasticsearch-core does not depend on server
+  // :libs:core does not depend on server
   // TODO: Need to decide how we want to handle for forbidden signatures with the changes to server
   replaceSignatureFiles 'jdk-signatures'
 }

+ 1 - 1
libs/dissect/build.gradle

@@ -9,7 +9,7 @@
 
 dependencies {
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-dissect'
+    exclude group: 'org.elasticsearch', module: 'dissect'
   }
   testImplementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
   testImplementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"

+ 1 - 1
libs/geo/build.gradle

@@ -12,7 +12,7 @@ apply plugin: 'elasticsearch.publish'
 
 dependencies {
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-geo'
+    exclude group: 'org.elasticsearch', module: 'geo'
   }
 }
 

+ 1 - 1
libs/grok/build.gradle

@@ -14,7 +14,7 @@ dependencies {
   api 'org.jruby.jcodings:jcodings:1.0.44'
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-grok'
+    exclude group: 'org.elasticsearch', module: 'grok'
   }
 }
 

+ 2 - 2
libs/h3/build.gradle

@@ -23,7 +23,7 @@ apply plugin: 'elasticsearch.publish'
 
 dependencies {
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-geo'
+    exclude group: 'org.elasticsearch', module: 'geo'
   }
   // lucene topology library that uses spherical geometry
   testImplementation "org.apache.lucene:lucene-spatial3d:${versions.lucene}"
@@ -40,4 +40,4 @@ licenseFile.set(rootProject.file('licenses/APACHE-LICENSE-2.0.txt'))
 
 tasks.withType(LicenseHeadersTask.class).configureEach {
   approvedLicenses = ['Apache', 'Generated', 'Vendored']
-}
+}

+ 2 - 2
libs/logging/build.gradle

@@ -14,12 +14,12 @@ tasks.named("loggerUsageCheck").configure {enabled = false }
 
 dependencies {
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-logging'
+    exclude group: 'org.elasticsearch', module: 'logging'
   }
 }
 
 
 tasks.named('forbiddenApisMain').configure {
-  // :libs:elasticsearch-logging does not depend on server
+  // :libs:logging does not depend on server
   replaceSignatureFiles 'jdk-signatures'
 }

+ 3 - 3
libs/logstash-bridge/build.gradle

@@ -10,9 +10,9 @@ apply plugin: 'elasticsearch.build'
 
 dependencies {
   compileOnly project(':server')
-  compileOnly project(':libs:elasticsearch-core')
-  compileOnly project(':libs:elasticsearch-plugin-api')
-  compileOnly project(':libs:elasticsearch-x-content')
+  compileOnly project(':libs:core')
+  compileOnly project(':libs:plugin-api')
+  compileOnly project(':libs:x-content')
   compileOnly project(':modules:lang-painless')
   compileOnly project(':modules:lang-painless:spi')
   compileOnly project(':modules:lang-mustache')

+ 2 - 2
libs/lz4/build.gradle

@@ -10,10 +10,10 @@ apply plugin: 'elasticsearch.publish'
 
 dependencies {
   api 'org.lz4:lz4-java:1.8.0'
-  api project(':libs:elasticsearch-core')
+  api project(':libs:core')
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-lz4'
+    exclude group: 'org.elasticsearch', module: 'lz4'
   }
 }
 

+ 4 - 4
libs/native/build.gradle

@@ -15,14 +15,14 @@ apply plugin: 'elasticsearch.mrjar'
 apply plugin: 'elasticsearch.embedded-providers'
 
 embeddedProviders {
-  impl 'native-access-jna', project(':libs:elasticsearch-native:jna')
+  impl 'native-access-jna', project(':libs:native:jna')
 }
 
 dependencies {
-  api project(':libs:elasticsearch-core')
-  api project(':libs:elasticsearch-logging')
+  api project(':libs:core')
+  api project(':libs:logging')
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-native'
+    exclude group: 'org.elasticsearch', module: 'native'
   }
 }
 

+ 3 - 3
libs/native/jna/build.gradle

@@ -14,12 +14,12 @@ base {
 }
 
 dependencies {
-  compileOnly project(':libs:elasticsearch-core')
-  compileOnly project(':libs:elasticsearch-native')
+  compileOnly project(':libs:core')
+  compileOnly project(':libs:native')
   implementation "net.java.dev.jna:jna:${versions.jna}"
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-native'
+    exclude group: 'org.elasticsearch', module: 'native'
   }
 }
 

+ 2 - 2
libs/plugin-analysis-api/build.gradle

@@ -18,12 +18,12 @@ tasks.named("loggerUsageCheck").configure {enabled = false }
 
 dependencies {
   api "org.apache.lucene:lucene-core:${versions.lucene}"
-  api project(':libs:elasticsearch-plugin-api')
+  api project(':libs:plugin-api')
 }
 
 
 tasks.named('forbiddenApisMain').configure {
-  // :libs:elasticsearch-logging does not depend on server
+  // :libs:logging does not depend on server
   replaceSignatureFiles 'jdk-signatures'
 }
 

+ 4 - 4
libs/plugin-scanner/build.gradle

@@ -16,16 +16,16 @@ tasks.named("dependencyLicenses").configure {
 }
 
 dependencies {
-  api project(':libs:elasticsearch-core')
-  api project(':libs:elasticsearch-plugin-api')
-  api project(":libs:elasticsearch-x-content")
+  api project(':libs:core')
+  api project(':libs:plugin-api')
+  api project(":libs:x-content")
 
   api 'org.ow2.asm:asm:9.7'
   api 'org.ow2.asm:asm-tree:9.7'
 
   testImplementation "junit:junit:${versions.junit}"
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-plugin-scanner'
+    exclude group: 'org.elasticsearch', module: 'plugin-scanner'
   }
 }
 tasks.named('forbiddenApisMain').configure {

+ 1 - 1
libs/secure-sm/build.gradle

@@ -16,7 +16,7 @@ dependencies {
   testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-secure-sm'
+    exclude group: 'org.elasticsearch', module: 'secure-sm'
   }
 }
 

+ 3 - 3
libs/simdvec/build.gradle

@@ -15,12 +15,12 @@ apply plugin: 'elasticsearch.build'
 apply plugin: 'elasticsearch.mrjar'
 
 dependencies {
-  implementation project(':libs:elasticsearch-native')
-  implementation project(':libs:elasticsearch-logging')
+  implementation project(':libs:native')
+  implementation project(':libs:logging')
   implementation "org.apache.lucene:lucene-core:${versions.lucene}"
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-native'
+    exclude group: 'org.elasticsearch', module: 'native'
   }
 }
 

+ 2 - 2
libs/ssl-config/build.gradle

@@ -9,10 +9,10 @@
 apply plugin: "elasticsearch.publish"
 
 dependencies {
-  api project(':libs:elasticsearch-core')
+  api project(':libs:core')
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-ssl-config'
+    exclude group: 'org.elasticsearch', module: 'ssl-config'
   }
 
   testImplementation "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"

+ 2 - 2
libs/tdigest/build.gradle

@@ -22,11 +22,11 @@ apply plugin: 'elasticsearch.build'
 apply plugin: 'elasticsearch.publish'
 
 dependencies {
-  api project(':libs:elasticsearch-core')
+  api project(':libs:core')
   api "org.apache.lucene:lucene-core:${versions.lucene}"
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-tdigest'
+    exclude group: 'org.elasticsearch', module: 'tdigest'
   }
   testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
 }

+ 3 - 3
libs/x-content/build.gradle

@@ -12,14 +12,14 @@ apply plugin: 'elasticsearch.publish'
 apply plugin: 'elasticsearch.embedded-providers'
 
 embeddedProviders {
-  impl 'x-content', project(':libs:elasticsearch-x-content:impl')
+  impl 'x-content', project(':libs:x-content:impl')
 }
 
 dependencies {
-  api project(':libs:elasticsearch-core')
+  api project(':libs:core')
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-x-content'
+    exclude group: 'org.elasticsearch', module: 'x-content'
   }
 }
 

+ 3 - 3
libs/x-content/impl/build.gradle

@@ -16,8 +16,8 @@ base {
 String jacksonVersion = "2.17.2"
 
 dependencies {
-  compileOnly project(':libs:elasticsearch-core')
-  compileOnly project(':libs:elasticsearch-x-content')
+  compileOnly project(':libs:core')
+  compileOnly project(':libs:x-content')
   implementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
   implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jacksonVersion}"
   implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${jacksonVersion}"
@@ -25,7 +25,7 @@ dependencies {
   implementation "org.yaml:snakeyaml:${versions.snakeyaml}"
 
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-x-content'
+    exclude group: 'org.elasticsearch', module: 'x-content'
   }
 }
 

+ 2 - 2
modules/ingest-common/build.gradle

@@ -20,8 +20,8 @@ esplugin {
 
 dependencies {
   compileOnly project(':modules:lang-painless:spi')
-  api project(':libs:elasticsearch-grok')
-  api project(':libs:elasticsearch-dissect')
+  api project(':libs:grok')
+  api project(':libs:dissect')
   implementation "org.apache.httpcomponents:httpclient:${versions.httpclient}"
   implementation "org.apache.httpcomponents:httpcore:${versions.httpcore}"
 }

+ 1 - 1
modules/reindex/build.gradle

@@ -38,7 +38,7 @@ testClusters.configureEach {
 
 dependencies {
   api project(":client:rest")
-  api project(":libs:elasticsearch-ssl-config")
+  api project(":libs:ssl-config")
   // for parent/child testing
   testImplementation project(':modules:parent-join')
   testImplementation project(':modules:rest-root')

+ 2 - 2
modules/runtime-fields-common/build.gradle

@@ -19,8 +19,8 @@ esplugin {
 
 dependencies {
   compileOnly project(':modules:lang-painless:spi')
-  api project(':libs:elasticsearch-grok')
-  api project(':libs:elasticsearch-dissect')
+  api project(':libs:grok')
+  api project(':libs:dissect')
 }
 
 tasks.named("yamlRestTestV7CompatTransform").configure { task ->

+ 1 - 1
modules/systemd/build.gradle

@@ -13,6 +13,6 @@ esplugin {
 }
 
 dependencies {
-  implementation project(':libs:elasticsearch-native')
+  implementation project(':libs:native')
 }
 

+ 2 - 2
modules/transport-netty4/build.gradle

@@ -35,7 +35,7 @@ configurations {
 }
 
 dependencies {
-  api project(":libs:elasticsearch-ssl-config")
+  api project(":libs:ssl-config")
 
   // network stack
   api "io.netty:netty-buffer:${versions.netty}"
@@ -244,4 +244,4 @@ tasks.named("thirdPartyAudit").configure {
 
 tasks.named('forbiddenApisMain').configure {
   signaturesFiles += files('forbidden/netty-signatures.txt')
-}
+}

+ 1 - 1
qa/logging-config/build.gradle

@@ -10,7 +10,7 @@ apply plugin: 'elasticsearch.build'
 apply plugin: 'elasticsearch.legacy-java-rest-test'
 
 dependencies {
-  testImplementation project(":libs:elasticsearch-x-content")
+  testImplementation project(":libs:x-content")
   testImplementation project(":test:framework")
 
 }

+ 1 - 1
qa/packaging/build.gradle

@@ -13,7 +13,7 @@ plugins {
 
 dependencies {
   testImplementation project(':server')
-  testImplementation project(':libs:elasticsearch-core')
+  testImplementation project(':libs:core')
   testImplementation(testArtifact(project(':x-pack:plugin:core')))
   testImplementation "junit:junit:${versions.junit}"
   testImplementation "org.hamcrest:hamcrest:${versions.hamcrest}"

+ 13 - 13
server/build.gradle

@@ -28,17 +28,17 @@ base {
 
 dependencies {
 
-  api project(':libs:elasticsearch-core')
-  api project(':libs:elasticsearch-logging')
-  api project(':libs:elasticsearch-secure-sm')
-  api project(':libs:elasticsearch-x-content')
-  api project(":libs:elasticsearch-geo")
-  api project(":libs:elasticsearch-lz4")
-  api project(":libs:elasticsearch-plugin-api")
-  api project(":libs:elasticsearch-plugin-analysis-api")
-  api project(':libs:elasticsearch-grok')
-  api project(":libs:elasticsearch-tdigest")
-  implementation project(":libs:elasticsearch-simdvec")
+  api project(':libs:core')
+  api project(':libs:logging')
+  api project(':libs:secure-sm')
+  api project(':libs:x-content')
+  api project(":libs:geo")
+  api project(":libs:lz4")
+  api project(":libs:plugin-api")
+  api project(":libs:plugin-analysis-api")
+  api project(':libs:grok')
+  api project(":libs:tdigest")
+  implementation project(":libs:simdvec")
 
   // lucene
   api "org.apache.lucene:lucene-core:${versions.lucene}"
@@ -56,7 +56,7 @@ dependencies {
   api "org.apache.lucene:lucene-suggest:${versions.lucene}"
 
   // utilities
-  api project(":libs:elasticsearch-cli")
+  api project(":libs:cli")
   implementation 'com.carrotsearch:hppc:0.8.1'
 
   // precentil ranks aggregation
@@ -67,7 +67,7 @@ dependencies {
   api "org.apache.logging.log4j:log4j-core:${versions.log4j}"
 
   // access to native functions
-  implementation project(':libs:elasticsearch-native')
+  implementation project(':libs:native')
 
   api "co.elastic.logging:log4j2-ecs-layout:${versions.ecsLogging}"
   api "co.elastic.logging:ecs-logging-core:${versions.ecsLogging}"

+ 1 - 11
settings.gradle

@@ -155,17 +155,7 @@ addSubProjects('', new File(rootProject.projectDir, 'x-pack/libs'))
 
 include projects.toArray(new String[0])
 
-project(":libs").children.each { libsProject ->
-  libsProject.name = "elasticsearch-${libsProject.name}"
-  libsProject.children.each { lp ->
-    lp.name = lp.name  // for :libs:elasticsearch-x-content:impl
-  }
-}
-project(":libs:elasticsearch-native:libraries").name = "elasticsearch-native-libraries"
-
-project(":qa:stable-api").children.each { libsProject ->
-  libsProject.name = "elasticsearch-${libsProject.name}"
-}
+project(":libs:native:libraries").name = "native-libraries"
 
 project(":test:external-modules").children.each { testProject ->
   testProject.name = "test-${testProject.name}"

+ 1 - 1
test/external-modules/apm-integration/build.gradle

@@ -22,5 +22,5 @@ tasks.named('javaRestTest').configure {
 
 dependencies {
   clusterModules project(':modules:apm')
-  implementation project(':libs:elasticsearch-logging')
+  implementation project(':libs:logging')
 }

+ 2 - 2
test/fixtures/geoip-fixture/build.gradle

@@ -13,8 +13,8 @@ description = 'Fixture for GeoIPv2 service'
 dependencies {
   api project(':server')
   api project(':distribution:tools:geoip-cli')
-  api project(":libs:elasticsearch-cli")
-  api project(":libs:elasticsearch-x-content")
+  api project(":libs:cli")
+  api project(":libs:x-content")
   api("junit:junit:${versions.junit}") {
     exclude module: 'hamcrest-core'
   }

+ 2 - 2
test/framework/build.gradle

@@ -14,9 +14,9 @@ apply plugin: 'elasticsearch.publish'
 dependencies {
   api project(":client:rest")
   api project(':modules:transport-netty4')
-  api project(':libs:elasticsearch-ssl-config')
+  api project(':libs:ssl-config')
   api project(":server")
-  api project(":libs:elasticsearch-cli")
+  api project(":libs:cli")
   api "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
   api "junit:junit:${versions.junit}"
   api "org.hamcrest:hamcrest:${versions.hamcrest}"

+ 1 - 1
test/x-content/build.gradle

@@ -12,7 +12,7 @@ apply plugin: 'elasticsearch.publish'
 
 dependencies {
   api project(":test:framework")
-  api project(":libs:elasticsearch-x-content")
+  api project(":libs:x-content")
 
   // json schema validation dependencies
   implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"

+ 1 - 1
x-pack/plugin/blob-cache/build.gradle

@@ -15,5 +15,5 @@ esplugin {
 }
 
 dependencies {
-    compileOnly project(path: ':libs:elasticsearch-native')
+    compileOnly project(path: ':libs:native')
 }

+ 2 - 2
x-pack/plugin/core/build.gradle

@@ -36,8 +36,8 @@ configurations {
 
 dependencies {
   compileOnly project(":server")
-  api project(':libs:elasticsearch-grok')
-  api project(":libs:elasticsearch-ssl-config")
+  api project(':libs:grok')
+  api project(":libs:ssl-config")
   api "org.apache.httpcomponents:httpclient:${versions.httpclient}"
   api "org.apache.httpcomponents:httpcore:${versions.httpcore}"
   api "org.apache.httpcomponents:httpcore-nio:${versions.httpcore}"

+ 2 - 2
x-pack/plugin/esql/build.gradle

@@ -26,8 +26,8 @@ dependencies {
   compileOnly project(xpackModule('ml'))
   implementation project('compute')
   implementation project('compute:ann')
-  implementation project(':libs:elasticsearch-dissect')
-  implementation project(':libs:elasticsearch-grok')
+  implementation project(':libs:dissect')
+  implementation project(':libs:grok')
   implementation project('arrow')
 
   // Also contains a dummy processor to allow compilation with unused annotations.

+ 2 - 2
x-pack/plugin/esql/qa/testFixtures/build.gradle

@@ -5,9 +5,9 @@ dependencies {
   implementation project(':x-pack:plugin:esql:compute')
   implementation project(':x-pack:plugin:esql')
   compileOnly project(path: xpackModule('core'))
-  implementation project(":libs:elasticsearch-x-content")
+  implementation project(":libs:x-content")
   implementation project(':client:rest')
-  implementation project(':libs:elasticsearch-logging')
+  implementation project(':libs:logging')
   implementation project(':test:framework')
   api(testArtifact(project(xpackModule('esql-core'))))
   implementation project(':server')

+ 1 - 1
x-pack/plugin/inference/build.gradle

@@ -32,7 +32,7 @@ versions << [
 ]
 
 dependencies {
-  implementation project(path: ':libs:elasticsearch-logging')
+  implementation project(path: ':libs:logging')
   compileOnly project(":server")
   compileOnly project(path: xpackModule('core'))
   testImplementation(testArtifact(project(xpackModule('core'))))

+ 1 - 1
x-pack/plugin/ml-package-loader/build.gradle

@@ -18,7 +18,7 @@ esplugin {
 }
 
 dependencies {
-  implementation project(path: ':libs:elasticsearch-logging')
+  implementation project(path: ':libs:logging')
   compileOnly project(":server")
   compileOnly project(path: xpackModule('core'))
   testImplementation(testArtifact(project(xpackModule('core'))))

+ 1 - 1
x-pack/plugin/ml/build.gradle

@@ -76,7 +76,7 @@ dependencies {
   testImplementation(testArtifact(project(xpackModule('security'))))
   testImplementation project(path: xpackModule('wildcard'))
   // ml deps
-  api project(':libs:elasticsearch-grok')
+  api project(':libs:grok')
   api project(':modules:lang-mustache')
   api "org.apache.commons:commons-math3:3.6.1"
   api "com.ibm.icu:icu4j:${versions.icu4j}"

+ 1 - 1
x-pack/plugin/searchable-snapshots/build.gradle

@@ -15,7 +15,7 @@ base {
 dependencies {
   compileOnly project(path: xpackModule('core'))
   compileOnly project(path: xpackModule('blob-cache'))
-  compileOnly project(path: ':libs:elasticsearch-native')
+  compileOnly project(path: ':libs:native')
   testImplementation(testArtifact(project(xpackModule('blob-cache'))))
   internalClusterTestImplementation(testArtifact(project(xpackModule('core'))))
   internalClusterTestImplementation(project(path: xpackModule('shutdown')))

+ 1 - 1
x-pack/plugin/spatial/build.gradle

@@ -15,7 +15,7 @@ dependencies {
   compileOnly project(':modules:lang-painless:spi')
   compileOnly project(path: xpackModule('core'))
   api "org.apache.lucene:lucene-spatial3d:${versions.lucene}"
-  api project(":libs:elasticsearch-h3")
+  api project(":libs:h3")
   testImplementation(testArtifact(project(xpackModule('core'))))
   testImplementation project(path: ':modules:percolator')
   testImplementation project(path: xpackModule('vector-tile'))

+ 3 - 3
x-pack/plugin/sql/sql-action/build.gradle

@@ -11,10 +11,10 @@ dependencies {
   api(project(':server')) {
     transitive = false
   }
-  api(project(':libs:elasticsearch-core')) {
+  api(project(':libs:core')) {
     transitive = false
   }
-  api(project(':libs:elasticsearch-x-content')) {
+  api(project(':libs:x-content')) {
     transitive = false
   }
   api project(':x-pack:plugin:core')
@@ -33,4 +33,4 @@ tasks.named('forbiddenApisMain').configure {
 tasks.named("dependencyLicenses").configure {
   mapping from: /jackson-.*/, to: 'jackson'
   mapping from: /lucene-.*/, to: 'lucene'
-}
+}

+ 1 - 1
x-pack/plugin/sql/sql-cli/build.gradle

@@ -29,7 +29,7 @@ dependencies {
   api "org.jline:jline-style:${jlineVersion}"
 
   api project(':x-pack:plugin:sql:sql-client')
-  api project(":libs:elasticsearch-cli")
+  api project(":libs:cli")
   implementation "net.java.dev.jna:jna:${versions.jna}"
   testImplementation project(":test:framework")
 }

+ 2 - 2
x-pack/plugin/sql/sql-proto/build.gradle

@@ -10,9 +10,9 @@ dependencies {
   api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
   api "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}"
 
-  testImplementation project(":libs:elasticsearch-x-content")
+  testImplementation project(":libs:x-content")
   testImplementation(project(":test:framework")) {
-    exclude group: 'org.elasticsearch', module: 'elasticsearch-x-content'
+    exclude group: 'org.elasticsearch', module: 'x-content'
   }
 }
 

+ 1 - 1
x-pack/plugin/text-structure/build.gradle

@@ -12,7 +12,7 @@ base {
 dependencies {
   compileOnly project(path: xpackModule('core'))
   testImplementation(testArtifact(project(xpackModule('core'))))
-  api project(':libs:elasticsearch-grok')
+  api project(':libs:grok')
   api "com.ibm.icu:icu4j:${versions.icu4j}"
   api "net.sf.supercsv:super-csv:${versions.supercsv}"
 }

+ 1 - 1
x-pack/plugin/transform/qa/common/build.gradle

@@ -1,7 +1,7 @@
 apply plugin: 'elasticsearch.internal-java-rest-test'
 
 dependencies {
-  api project(':libs:elasticsearch-x-content')
+  api project(':libs:x-content')
   api project(':test:framework')
   api project(xpackModule('core'))
 }