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 418f8524665..878fb0c21ee 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/plugin/PluginBuildPlugin.groovy @@ -175,7 +175,7 @@ public class PluginBuildPlugin extends BuildPlugin { static final Pattern GIT_PATTERN = Pattern.compile(/git@([^:]+):([^\.]+)\.git/) /** Find the reponame. */ - protected static String urlFromOrigin(String origin) { + static String urlFromOrigin(String origin) { if (origin.startsWith('https')) { return origin } @@ -209,7 +209,7 @@ public class PluginBuildPlugin extends BuildPlugin { } } - /** Adds a task to generate a*/ + /** Adds a task to generate a pom file for the zip distribution. */ protected void addZipPomGeneration(Project project) { project.plugins.apply(MavenPublishPlugin.class) diff --git a/distribution/integ-test-zip/build.gradle b/distribution/integ-test-zip/build.gradle index 19999ab484e..0a92b0b058f 100644 --- a/distribution/integ-test-zip/build.gradle +++ b/distribution/integ-test-zip/build.gradle @@ -17,6 +17,8 @@ * under the License. */ +import org.elasticsearch.gradle.plugin.PluginBuildPlugin + task buildZip(type: Zip) { baseName = 'elasticsearch' with archivesFiles @@ -33,9 +35,18 @@ publishing { artifactId 'elasticsearch' artifact buildZip } + // TODO explain why we can't use the pom build by nebula nebulaRealPom(MavenPublication) { artifactId 'elasticsearch' pom.packaging = 'pom' + pom.withXml { XmlProvider xml -> + Node root = xml.asNode() + root.appendNode('name', 'Elasticsearch') + root.appendNode('description', 'A Distributed RESTful Search Engine') + root.appendNode('url', PluginBuildPlugin.urlFromOrigin(project.scminfo.origin)) + Node scmNode = root.appendNode('scm') + scmNode.appendNode('url', project.scminfo.origin) + } } } } diff --git a/distribution/zip/build.gradle b/distribution/zip/build.gradle index 8b7bb385298..0a92b0b058f 100644 --- a/distribution/zip/build.gradle +++ b/distribution/zip/build.gradle @@ -17,6 +17,8 @@ * under the License. */ +import org.elasticsearch.gradle.plugin.PluginBuildPlugin + task buildZip(type: Zip) { baseName = 'elasticsearch' with archivesFiles @@ -33,12 +35,20 @@ publishing { artifactId 'elasticsearch' artifact buildZip } + // TODO explain why we can't use the pom build by nebula nebulaRealPom(MavenPublication) { artifactId 'elasticsearch' pom.packaging = 'pom' + pom.withXml { XmlProvider xml -> + Node root = xml.asNode() + root.appendNode('name', 'Elasticsearch') + root.appendNode('description', 'A Distributed RESTful Search Engine') + root.appendNode('url', PluginBuildPlugin.urlFromOrigin(project.scminfo.origin)) + Node scmNode = root.appendNode('scm') + scmNode.appendNode('url', project.scminfo.origin) + } } } } integTest.dependsOn buildZip -