Fix up nebulaRealPom
I'm not sure why we need this pom instead of the pom generated by nebula, but if we are going to have it then we need to populate it with appropriate stuff like project name, description, and url.
This commit is contained in:
parent
c2d621dfdf
commit
3771d80830
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue