You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ma...@apache.org on 2019/06/18 04:40:50 UTC

[beam] branch master updated: [BEAM-7467] Add dependency classifier to published pom (#8868)

This is an automated email from the ASF dual-hosted git repository.

mauzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 77456c1  [BEAM-7467] Add dependency classifier to published pom (#8868)
77456c1 is described below

commit 77456c1a1bc42b0ffce4e8eb9290fa9b4e5d718b
Author: Manu Zhang <Ow...@gmail.com>
AuthorDate: Tue Jun 18 12:40:30 2019 +0800

    [BEAM-7467] Add dependency classifier to published pom (#8868)
---
 .../main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy   | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index 2bccfbe..699344f 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -1127,17 +1127,26 @@ class BeamModulePlugin implements Plugin<Project> {
                 def generateDependenciesFromConfiguration = { param ->
                   project.configurations."${param.configuration}".allDependencies.each {
                     def dependencyNode = dependenciesNode.appendNode('dependency')
+                    def appendClassifier = { dep ->
+                      dep.artifacts.each { art ->
+                        if (art.hasProperty('classifier')) {
+                          dependencyNode.appendNode('classifier', art.classifier)
+                        }
+                      }
+                    }
 
                     if (it instanceof ProjectDependency) {
                       dependencyNode.appendNode('groupId', it.getDependencyProject().mavenGroupId)
                       dependencyNode.appendNode('artifactId', it.getDependencyProject().archivesBaseName)
                       dependencyNode.appendNode('version', it.version)
                       dependencyNode.appendNode('scope', param.scope)
+                      appendClassifier(it)
                     } else {
                       dependencyNode.appendNode('groupId', it.group)
                       dependencyNode.appendNode('artifactId', it.name)
                       dependencyNode.appendNode('version', it.version)
                       dependencyNode.appendNode('scope', param.scope)
+                      appendClassifier(it)
                     }
 
                     // Start with any exclusions that were added via configuration exclude rules.