Skip to content

Commit

Permalink
Update nebula-publishing-plugin to 19.2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Jan 4, 2023
1 parent 4e2369d commit e6eafe3
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Bumps `maven-model` from 3.6.2 to 3.8.6 ([#5599](https://github.com/opensearch-project/OpenSearch/pull/5599))
- Bumps `maxmind-db` from 2.1.0 to 3.0.0 ([#5601](https://github.com/opensearch-project/OpenSearch/pull/5601))
- Bumps `protobuf-java` from 3.21.11 to 3.21.12 ([#5603](https://github.com/opensearch-project/OpenSearch/pull/5603))
- Update nebula-publishing-plugin to 19.2.0 ([#5704](https://github.com/opensearch-project/OpenSearch/pull/5704))

### Changed
- [CCR] Add getHistoryOperationsFromTranslog method to fetch the history snapshot from translogs ([#3948](https://github.com/opensearch-project/OpenSearch/pull/3948))
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ dependencies {
api 'org.apache.commons:commons-compress:1.22'
api 'org.apache.ant:ant:1.10.12'
api 'com.netflix.nebula:gradle-extra-configurations-plugin:8.0.0'
api 'com.netflix.nebula:nebula-publishing-plugin:4.6.0'
api 'com.netflix.nebula:nebula-publishing-plugin:19.2.0'
api 'com.netflix.nebula:gradle-info-plugin:12.0.0'
api 'org.apache.rat:apache-rat:0.15'
api 'commons-io:commons-io:2.7'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class PluginBuildPlugin implements Plugin<Project> {
private void configurePublishing(Project project, PluginPropertiesExtension extension) {
// Only configure publishing if applied externally
if (extension.hasClientJar) {
project.pluginManager.apply('nebula.maven-base-publish')
project.pluginManager.apply('com.netflix.nebula.maven-base-publish')
// Only change Jar tasks, we don't want a -client zip so we can't change archivesBaseName
project.tasks.withType(Jar) {
archiveBaseName = archiveBaseName.get() + "-client"
Expand Down
11 changes: 8 additions & 3 deletions buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public class PublishPlugin implements Plugin<Project> {

@Override
public void apply(Project project) {
project.getPluginManager().apply("nebula.maven-base-publish");
project.getPluginManager().apply("com.netflix.nebula.maven-base-publish");
project.getPluginManager().apply("com.netflix.nebula.maven-nebula-publish");
project.getPluginManager().apply(PomValidationPrecommitPlugin.class);

configureJavadocJar(project);
Expand Down Expand Up @@ -108,8 +109,12 @@ public String call() throws Exception {
// Here we manually add any project dependencies in the "shadow" configuration to our generated POM
publication.getPom().withXml(xml -> {
Node root = xml.asNode();
root.appendNode("name", project.getName());
root.appendNode("description", project.getDescription());
if (((NodeList) root.get("name")).isEmpty()) {
root.appendNode("name", project.getName());
}
if (((NodeList) root.get("description")).isEmpty()) {
root.appendNode("description", project.getDescription());
}
Node dependenciesNode = (Node) ((NodeList) root.get("dependencies")).get(0);
project.getConfigurations().getByName(ShadowBasePlugin.CONFIGURATION_NAME).getAllDependencies().all(dependency -> {
if (dependency instanceof ProjectDependency) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private void addZipArtifact(Project project) {

@Override
public void apply(Project project) {
project.getPluginManager().apply("nebula.maven-base-publish");
project.getPluginManager().apply("com.netflix.nebula.maven-nebula-publish");
project.getPluginManager().apply(MavenPublishPlugin.class);
project.afterEvaluate(evaluatedProject -> {
if (isZipPublicationPresent(project)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void applyZipPublicationPluginNoConfig() {
project.getTasks().size()
);

// Tasks applied from "nebula.maven-base-publish"
// Tasks applied from "com.netflix.nebula.maven-base-publish"
assertTrue(
project.getTasks()
.findByName("generateMetadataFileForNebulaPublication") instanceof org.gradle.api.publish.tasks.GenerateModuleMetadata
Expand Down Expand Up @@ -126,8 +126,8 @@ public void applyZipPublicationPluginNoConfig() {
project.getPlugins().findPlugin(org.gradle.api.publish.plugins.PublishingPlugin.class)
);
assertNotNull(
"Project is expected to have nebula MavenBasePublishPlugin plugin (applied from OpenSearch pluginzip plugin)",
project.getPlugins().findPlugin(nebula.plugin.publishing.maven.MavenBasePublishPlugin.class)
"Project is expected to have nebula MavenNebulaPublishPlugin plugin (applied from OpenSearch pluginzip plugin)",
project.getPlugins().findPlugin(nebula.plugin.publishing.maven.MavenNebulaPublishPlugin.class)
);
}

Expand Down
1 change: 1 addition & 0 deletions distribution/archives/integ-test-zip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ apply plugin: 'opensearch.rest-test'

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

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

Expand Down
2 changes: 1 addition & 1 deletion modules/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ configure(subprojects.findAll { it.parent.path == project.path }) {
group = 'org.opensearch.plugin' // for modules which publish client jars
apply plugin: 'opensearch.testclusters'
apply plugin: 'opensearch.opensearchplugin'

opensearchplugin {
// for local OpenSearch plugins, the name of the plugin is the same as the directory
name project.name
Expand Down
1 change: 1 addition & 0 deletions modules/lang-painless/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin
apply plugin: 'opensearch.validate-rest-spec'
apply plugin: 'opensearch.yaml-rest-test'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.netflix.nebula.maven-shadow-publish'

opensearchplugin {
description 'An easy, safe and fast scripting language for OpenSearch'
Expand Down
2 changes: 1 addition & 1 deletion server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ apply plugin: 'opensearch.internal-cluster-test'

publishing {
publications {
nebula {
nebula(MavenPublication) {
artifactId 'opensearch'
}
}
Expand Down

0 comments on commit e6eafe3

Please sign in to comment.