Skip to content

Commit

Permalink
Fix the release build by only applying the Maven publish task to eith…
Browse files Browse the repository at this point in the history
…er projects with a name starting with data-prepper or any projects that are children of the data-prepper-plugins project. (#4337) (#4339)

Signed-off-by: David Venable <dlv@amazon.com>
(cherry picked from commit 8760945)

Co-authored-by: David Venable <dlv@amazon.com>
  • Loading branch information
opensearch-trigger-bot[bot] and dlvenable committed Mar 27, 2024
1 parent 4795d4d commit 5d8c59b
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,46 +42,48 @@ allprojects {
}
}

project.plugins.withType(JavaPlugin).configureEach {
java {
withJavadocJar()
withSourcesJar()
}
if(project.name.startsWith('data-prepper') || project.parent != null && project.parent.name.equals('data-prepper-plugins')) {
project.plugins.withType(JavaPlugin).configureEach {
java {
withJavadocJar()
withSourcesJar()
}

afterEvaluate {
project.publishing {
repositories {
maven {
url "file://${mavenPublicationRootFile.absolutePath}"
afterEvaluate {
project.publishing {
repositories {
maven {
url "file://${mavenPublicationRootFile.absolutePath}"
}
}
}
publications {
mavenJava(MavenPublication) {
from project.components.findByName("java") ?: project.components.findByName("javaLibrary")
publications {
mavenJava(MavenPublication) {
from project.components.findByName("java") ?: project.components.findByName("javaLibrary")

groupId = project.group
artifactId = project.name
version = project.version
groupId = project.group
artifactId = project.name
version = project.version

pom {
name = project.name
description = "Data Prepper project: ${project.name}"
url = 'https://github.com/opensearch-project/data-prepper'
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
pom {
name = project.name
description = "Data Prepper project: ${project.name}"
url = 'https://github.com/opensearch-project/data-prepper'
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
}
developers {
developer {
name = 'OpenSearch'
url = 'https://github.com/opensearch-project'
developers {
developer {
name = 'OpenSearch'
url = 'https://github.com/opensearch-project'
}
}
scm {
url = 'https://github.com/opensearch-project/data-prepper'
}
}
scm {
url = 'https://github.com/opensearch-project/data-prepper'
}
}
}
Expand Down

0 comments on commit 5d8c59b

Please sign in to comment.