Skip to content

Commit

Permalink
Build: Add pom generation to meta plugins (elastic#28321)
Browse files Browse the repository at this point in the history
This commit adds pom generation to meta plugins by using the same hacks
that PluginBuildPlugin already uses to get around "pom" type poms (ie
zip files).
  • Loading branch information
rjernst authored and jasontedor committed Jan 21, 2018
1 parent ef76d99 commit 3a43bb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.elasticsearch.gradle.plugin

import org.elasticsearch.gradle.test.RestIntegTestTask
import org.elasticsearch.gradle.BuildPlugin
import org.elasticsearch.gradle.test.RestTestPlugin
import org.elasticsearch.gradle.test.RunTask
import org.elasticsearch.gradle.test.StandaloneRestTestPlugin
Expand All @@ -42,6 +42,10 @@ class MetaPluginBuildPlugin implements Plugin<Project> {
dependsOn(project.bundlePlugin)
plugin(project.path)
}
BuildPlugin.configurePomGeneration(project)
project.afterEvaluate {
PluginBuildPlugin.addZipPomGeneration(project)
}

RunTask run = project.tasks.create('run', RunTask)
run.dependsOn(project.bundlePlugin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.elasticsearch.gradle.plugin

import nebula.plugin.info.scm.ScmInfoPlugin
import org.elasticsearch.gradle.BuildPlugin
import org.elasticsearch.gradle.NoticeTask
import org.elasticsearch.gradle.test.RestIntegTestTask
Expand Down Expand Up @@ -220,7 +221,8 @@ public class PluginBuildPlugin extends BuildPlugin {
}

/** Adds a task to generate a pom file for the zip distribution. */
protected void addZipPomGeneration(Project project) {
public static void addZipPomGeneration(Project project) {
project.plugins.apply(ScmInfoPlugin.class)
project.plugins.apply(MavenPublishPlugin.class)

project.publishing {
Expand Down

0 comments on commit 3a43bb1

Please sign in to comment.