Skip to content

Commit 3b51bc5

Browse files
authored
Update nebula-publishing-plugin to 19.2.0 (opensearch-project#5704)
Signed-off-by: Andriy Redko <[email protected]> Signed-off-by: Andriy Redko <[email protected]>
1 parent 12782f7 commit 3b51bc5

File tree

9 files changed

+18
-11
lines changed

9 files changed

+18
-11
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5454
- Bumps `maven-model` from 3.6.2 to 3.8.6 ([#5599](https://github.com/opensearch-project/OpenSearch/pull/5599))
5555
- Bumps `maxmind-db` from 2.1.0 to 3.0.0 ([#5601](https://github.com/opensearch-project/OpenSearch/pull/5601))
5656
- Bumps `protobuf-java` from 3.21.11 to 3.21.12 ([#5603](https://github.com/opensearch-project/OpenSearch/pull/5603))
57+
- Update nebula-publishing-plugin to 19.2.0 ([#5704](https://github.com/opensearch-project/OpenSearch/pull/5704))
5758

5859
### Changed
5960
- [CCR] Add getHistoryOperationsFromTranslog method to fetch the history snapshot from translogs ([#3948](https://github.com/opensearch-project/OpenSearch/pull/3948))

buildSrc/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ dependencies {
106106
api 'org.apache.commons:commons-compress:1.22'
107107
api 'org.apache.ant:ant:1.10.12'
108108
api 'com.netflix.nebula:gradle-extra-configurations-plugin:8.0.0'
109-
api 'com.netflix.nebula:nebula-publishing-plugin:4.6.0'
109+
api 'com.netflix.nebula:nebula-publishing-plugin:19.2.0'
110110
api 'com.netflix.nebula:gradle-info-plugin:12.0.0'
111111
api 'org.apache.rat:apache-rat:0.15'
112112
api 'commons-io:commons-io:2.7'

buildSrc/src/main/groovy/org/opensearch/gradle/plugin/PluginBuildPlugin.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class PluginBuildPlugin implements Plugin<Project> {
149149
private void configurePublishing(Project project, PluginPropertiesExtension extension) {
150150
// Only configure publishing if applied externally
151151
if (extension.hasClientJar) {
152-
project.pluginManager.apply('nebula.maven-base-publish')
152+
project.pluginManager.apply('com.netflix.nebula.maven-base-publish')
153153
// Only change Jar tasks, we don't want a -client zip so we can't change archivesBaseName
154154
project.tasks.withType(Jar) {
155155
archiveBaseName = archiveBaseName.get() + "-client"

buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ public class PublishPlugin implements Plugin<Project> {
6767

6868
@Override
6969
public void apply(Project project) {
70-
project.getPluginManager().apply("nebula.maven-base-publish");
70+
project.getPluginManager().apply("com.netflix.nebula.maven-base-publish");
71+
project.getPluginManager().apply("com.netflix.nebula.maven-nebula-publish");
7172
project.getPluginManager().apply(PomValidationPrecommitPlugin.class);
7273

7374
configureJavadocJar(project);
@@ -108,8 +109,12 @@ public String call() throws Exception {
108109
// Here we manually add any project dependencies in the "shadow" configuration to our generated POM
109110
publication.getPom().withXml(xml -> {
110111
Node root = xml.asNode();
111-
root.appendNode("name", project.getName());
112-
root.appendNode("description", project.getDescription());
112+
if (((NodeList) root.get("name")).isEmpty()) {
113+
root.appendNode("name", project.getName());
114+
}
115+
if (((NodeList) root.get("description")).isEmpty()) {
116+
root.appendNode("description", project.getDescription());
117+
}
113118
Node dependenciesNode = (Node) ((NodeList) root.get("dependencies")).get(0);
114119
project.getConfigurations().getByName(ShadowBasePlugin.CONFIGURATION_NAME).getAllDependencies().all(dependency -> {
115120
if (dependency instanceof ProjectDependency) {

buildSrc/src/main/java/org/opensearch/gradle/pluginzip/Publish.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private void addZipArtifact(Project project) {
5959

6060
@Override
6161
public void apply(Project project) {
62-
project.getPluginManager().apply("nebula.maven-base-publish");
62+
project.getPluginManager().apply("com.netflix.nebula.maven-nebula-publish");
6363
project.getPluginManager().apply(MavenPublishPlugin.class);
6464
project.afterEvaluate(evaluatedProject -> {
6565
if (isZipPublicationPresent(project)) {

buildSrc/src/test/java/org/opensearch/gradle/pluginzip/PublishTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void applyZipPublicationPluginNoConfig() {
8989
project.getTasks().size()
9090
);
9191

92-
// Tasks applied from "nebula.maven-base-publish"
92+
// Tasks applied from "com.netflix.nebula.maven-base-publish"
9393
assertTrue(
9494
project.getTasks()
9595
.findByName("generateMetadataFileForNebulaPublication") instanceof org.gradle.api.publish.tasks.GenerateModuleMetadata
@@ -126,8 +126,8 @@ public void applyZipPublicationPluginNoConfig() {
126126
project.getPlugins().findPlugin(org.gradle.api.publish.plugins.PublishingPlugin.class)
127127
);
128128
assertNotNull(
129-
"Project is expected to have nebula MavenBasePublishPlugin plugin (applied from OpenSearch pluginzip plugin)",
130-
project.getPlugins().findPlugin(nebula.plugin.publishing.maven.MavenBasePublishPlugin.class)
129+
"Project is expected to have nebula MavenNebulaPublishPlugin plugin (applied from OpenSearch pluginzip plugin)",
130+
project.getPlugins().findPlugin(nebula.plugin.publishing.maven.MavenNebulaPublishPlugin.class)
131131
);
132132
}
133133

distribution/archives/integ-test-zip/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ apply plugin: 'opensearch.rest-test'
3434

3535
// The integ-test-distribution is published to maven
3636
apply plugin: 'opensearch.publish'
37+
apply plugin: 'com.netflix.nebula.maven-publish'
3738

3839
group = "org.opensearch.distribution.integ-test-zip"
3940

modules/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ configure(subprojects.findAll { it.parent.path == project.path }) {
3232
group = 'org.opensearch.plugin' // for modules which publish client jars
3333
apply plugin: 'opensearch.testclusters'
3434
apply plugin: 'opensearch.opensearchplugin'
35-
35+
3636
opensearchplugin {
3737
// for local OpenSearch plugins, the name of the plugin is the same as the directory
3838
name project.name

server/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ apply plugin: 'opensearch.internal-cluster-test'
3737

3838
publishing {
3939
publications {
40-
nebula {
40+
nebula(MavenPublication) {
4141
artifactId 'opensearch'
4242
}
4343
}

0 commit comments

Comments
 (0)