From c414a6ceddb56c24b89079bfbd216f6bef60a220 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Thu, 28 Jul 2016 12:19:10 -0700 Subject: [PATCH] Build: Fix client jars for plugins/modules to have the correct artifactId For transport client plugins, the jars and poms are renamed with the -client suffix. But we need the artifactId to match the id in the filename. --- .../org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy index 90b9dbe68f2..b7b563bf158 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy @@ -57,7 +57,7 @@ public class PluginBuildPlugin extends BuildPlugin { // file to a new name, copy the nebula generated pom to the same name, // and generate a different pom for the zip project.signArchives.enabled = false - addJarPomGeneration(project) + addClientJarPomGeneration(project) addClientJarTask(project) if (isModule == false) { addZipPomGeneration(project) @@ -192,13 +192,14 @@ public class PluginBuildPlugin extends BuildPlugin { } /** Adds nebula publishing task to generate a pom file for the plugin. */ - protected static void addJarPomGeneration(Project project) { + protected static void addClientJarPomGeneration(Project project) { project.plugins.apply(MavenPublishPlugin.class) project.publishing { publications { jar(MavenPublication) { from project.components.java + artifactId = artifactId + '-client' pom.withXml { XmlProvider xml -> Node root = xml.asNode() root.appendNode('name', project.pluginProperties.extension.name)