This is an automated email from the ASF dual-hosted git repository.
suvasude pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-gobblin.git
The following commit(s) were added to refs/heads/master by this push:
new cb3e51f [GOBBLIN-1246] Modify build scripts to fix failures in Nexus
artifact …
cb3e51f is described below
commit cb3e51ffc6e7c9ef34391632bef568a14ddff6f6
Author: sv2000 <[email protected]>
AuthorDate: Fri Aug 21 07:29:50 2020 -0700
[GOBBLIN-1246] Modify build scripts to fix failures in Nexus artifact …
Closes #3087 from sv2000/nexusPublishing
---
gobblin-cluster/build.gradle | 27 +++++++++++++++++++++++++++
gobblin-runtime/build.gradle | 22 ++++++++++++++++++----
gobblin-service/build.gradle | 21 +++++++++++++++++----
gradle/scripts/nexusPublishing.gradle | 21 +++++++++++++++++++++
4 files changed, 83 insertions(+), 8 deletions(-)
diff --git a/gobblin-cluster/build.gradle b/gobblin-cluster/build.gradle
index aaa703d..016871b 100644
--- a/gobblin-cluster/build.gradle
+++ b/gobblin-cluster/build.gradle
@@ -103,4 +103,31 @@ test {
maxParallelForks = 1
}
+install {
+ repositories {
+ mavenInstaller {
+ addFilter(testJar.baseName) { artifact, file ->
+ artifact.name == testJar.baseName
+ }.project(rootProject.pomAttributes).artifactId = testJar.baseName
+ addFilter('') { artifact, file ->
+ artifact.name == jar.baseName
+ }
+ }
+ }
+}
+if (rootProject.ext.publishToMaven || rootProject.ext.publishToNexus) {
+ uploadArchives {
+ repositories {
+ mavenDeployer {
+ addFilter(testJar.baseName) { artifact, file ->
+ artifact.name == testJar.baseName
+ }.project(rootProject.pomAttributes).artifactId = testJar.baseName
+ addFilter('') { artifact, file ->
+ artifact.name == jar.baseName
+ }
+ }
+ }
+ }
+}
+
ext.classification="library"
diff --git a/gobblin-runtime/build.gradle b/gobblin-runtime/build.gradle
index 58712d9..f11e44a 100644
--- a/gobblin-runtime/build.gradle
+++ b/gobblin-runtime/build.gradle
@@ -100,15 +100,29 @@ dependencies {
// Begin HACK to get around POM being depenendent on the (empty)
gobblin-rest-api instead of gobblin-rest-api-rest-client
def installer = install.repositories.mavenInstaller
+
[installer]*.pom*.whenConfigured {pom ->
- pom.dependencies.find {dep -> dep.groupId == project.group &&
dep.artifactId == 'gobblin-rest-api' }.artifactId =
'gobblin-rest-api-rest-client'
- pom.dependencies.find {dep -> dep.groupId == project.group &&
dep.artifactId == 'gobblin-rest-api' }.artifactId =
'gobblin-rest-api-data-template'
+ def it = pom.dependencies
+ def s = it.find {dep -> dep.groupId == project.group && dep.artifactId ==
'gobblin-rest-api' }
+ if (s != null) {
+ def t = s.clone()
+ t.artifactId = 'gobblin-rest-api-data-template'
+ it.add(t)
+ s.artifactId = 'gobblin-rest-api-rest-client'
+ }
}
+
if (rootProject.publishToMaven || rootProject.publishToNexus) {
def deployer = uploadArchives.repositories.mavenDeployer
[deployer]*.pom*.whenConfigured {pom ->
- pom.dependencies.find {dep -> dep.groupId == project.group &&
dep.artifactId == 'gobblin-rest-api' }.artifactId =
'gobblin-rest-api-rest-client'
- pom.dependencies.find {dep -> dep.groupId == project.group &&
dep.artifactId == 'gobblin-rest-api' }.artifactId =
'gobblin-rest-api-data-template'
+ def it = pom.dependencies
+ def s = it.find {dep -> dep.groupId == project.group && dep.artifactId
== 'gobblin-rest-api' }
+ if (s != null) {
+ def t = s.clone()
+ t.artifactId = 'gobblin-rest-api-data-template'
+ it.add(t)
+ s.artifactId = 'gobblin-rest-api-rest-client'
+ }
}
}
// End HACK
diff --git a/gobblin-service/build.gradle b/gobblin-service/build.gradle
index 3d98f66..9d9b3f1 100644
--- a/gobblin-service/build.gradle
+++ b/gobblin-service/build.gradle
@@ -91,14 +91,27 @@ dependencies {
// Begin HACK to get around POM being depenendent on the (empty)
gobblin-rest-api instead of gobblin-rest-api-rest-client
def installer = install.repositories.mavenInstaller
[installer]*.pom*.whenConfigured {pom ->
- pom.dependencies.find {dep -> dep.groupId == project.group &&
dep.artifactId == 'gobblin-flow-config-service-api' }.artifactId =
'gobblin-flow-config-service-api-rest-client'
- pom.dependencies.find {dep -> dep.groupId == project.group &&
dep.artifactId == 'gobblin-flow-config-service-api' }.artifactId =
'gobblin-flow-config-service-api-data-template'
+ def it = pom.dependencies
+ def s = it.find {dep -> dep.groupId == project.group && dep.artifactId ==
'gobblin-flow-config-service-api' }
+ if (s != null) {
+ def t = s.clone()
+ t.artifactId = 'gobblin-flow-config-service-api-data-template'
+ it.add(t)
+ s.artifactId = 'gobblin-flow-config-service-api-rest-client'
+ }
}
+
if (rootProject.publishToMaven || rootProject.publishToNexus) {
def deployer = uploadArchives.repositories.mavenDeployer
[deployer]*.pom*.whenConfigured {pom ->
- pom.dependencies.find {dep -> dep.groupId == project.group &&
dep.artifactId == 'gobblin-flow-config-service-api' }.artifactId =
'gobblin-flow-config-service-api-rest-client'
- pom.dependencies.find {dep -> dep.groupId == project.group &&
dep.artifactId == 'gobblin-flow-config-service-api' }.artifactId =
'gobblin-flow-config-service-api-data-template'
+ def it = pom.dependencies
+ def s = it.find {dep -> dep.groupId == project.group && dep.artifactId
== 'gobblin-flow-config-service-api' }
+ if (s != null) {
+ def t = s.clone()
+ t.artifactId = 'gobblin-flow-config-service-api-data-template'
+ it.add(t)
+ s.artifactId = 'gobblin-flow-config-service-api-rest-client'
+ }
}
}
// End HACK
diff --git a/gradle/scripts/nexusPublishing.gradle
b/gradle/scripts/nexusPublishing.gradle
index 7fa8e95..0770e39 100644
--- a/gradle/scripts/nexusPublishing.gradle
+++ b/gradle/scripts/nexusPublishing.gradle
@@ -64,6 +64,27 @@ gradle.taskGraph.afterTask {
}
}
+ext.pomAttributes = {
+ packaging 'jar'
+ // optionally artifactId can be defined here
+ name 'Apache Gobblin (incubating)'
+ description 'A distributed data integration framework for streaming and
batch data ecosystems.'
+ url 'https://gobblin.apache.org/'
+
+ scm {
+ url
'https://git-wip-us.apache.org/repos/asf?p=incubator-gobblin.git;a=tree'
+ connection
'scm:http://git-wip-us.apache.org/repos/asf/incubator-gobblin.git'
+ developerConnection
'scm:https://git-wip-us.apache.org/repos/asf/incubator-gobblin.git'
+ }
+
+ licenses {
+ license {
+ name 'The Apache License, Version 2.0'
+ url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ }
+ }
+}
+
subprojects {
plugins.withType(JavaPlugin) {
plugins.apply('maven')