[ 
https://issues.apache.org/jira/browse/BEAM-3249?focusedWorklogId=90048&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-90048
 ]

ASF GitHub Bot logged work on BEAM-3249:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Apr/18 17:19
            Start Date: 11/Apr/18 17:19
    Worklog Time Spent: 10m 
      Work Description: lukecwik closed pull request #5098: [BEAM-3249] Add 
support for translating 'provided' scope dependencies to the generated pom.
URL: https://github.com/apache/beam/pull/5098
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/build_rules.gradle b/build_rules.gradle
index 08b578ec724..ed09ee7fe0b 100644
--- a/build_rules.gradle
+++ b/build_rules.gradle
@@ -300,7 +300,6 @@ class JavaNatureConfiguration {
 //  * maven
 //  * net.ltgt.apt (plugin to configure annotation processing tool)
 //  * propdeps (provide optional and provided dependency configurations)
-//  * propdeps-maven (configure Maven pom generation to understand optional 
and provided dependency configurations)
 //  * checkstyle
 //  * findbugs
 //  * shadow
@@ -395,7 +394,6 @@ ext.applyJavaNature = {
   // TODO: Either remove these plugins and find another way to generate the 
Maven poms
   // with the correct dependency scopes configured.
   apply plugin: 'propdeps'
-  apply plugin: 'propdeps-maven'
 
   // Configures a checkstyle plugin enforcing a set of rules and also allows 
for a set of
   // suppressions.
@@ -655,34 +653,39 @@ ext.applyJavaNature = {
             // Iterate over the dependencies that would exist post shading,
             // adding a <dependency> node for each
             def dependenciesNode = root.appendNode('dependencies')
-            configurations.shadow.allDependencies.each {
-              def dependencyNode = dependenciesNode.appendNode('dependency')
-              dependencyNode.appendNode('groupId', it.group)
-              dependencyNode.appendNode('artifactId', it.name)
-              dependencyNode.appendNode('version', it.version)
-
-              // TODO: Should we use the runtime scope which forces all our
-              // consumers to declare what they consume?
-              dependencyNode.appendNode('scope', 'compile')
-
-              // Start with any exclusions that were added via configuration 
exclude rules.
-              // Then add all the exclusions that are specific to the 
dependency (if any
-              // were declared). Finally build the node that represents all 
exclusions.
-              def exclusions = []
-              exclusions += configurations.shadow.excludeRules
-              if (it.hasProperty('excludeRules')) {
-                exclusions += it.excludeRules
-              }
-              if (!exclusions.empty) {
-                def exclusionsNode = dependencyNode.appendNode('exclusions')
-                for (ExcludeRule exclude : exclusions) {
-                  def exclusionNode = exclusionsNode.appendNode('exclusion')
-                  exclusionNode.appendNode('groupId', exclude.group)
-                  exclusionNode.appendNode('artifactId', exclude.module)
+            def generateDependenciesFromConfiguration = { param ->
+              configurations."${param.configuration}".allDependencies.each {
+                def dependencyNode = dependenciesNode.appendNode('dependency')
+                dependencyNode.appendNode('groupId', it.group)
+                dependencyNode.appendNode('artifactId', it.name)
+                dependencyNode.appendNode('version', it.version)
+
+                dependencyNode.appendNode('scope', param.scope)
+
+                // Start with any exclusions that were added via configuration 
exclude rules.
+                // Then add all the exclusions that are specific to the 
dependency (if any
+                // were declared). Finally build the node that represents all 
exclusions.
+                def exclusions = []
+                exclusions += 
configurations."${param.configuration}".excludeRules
+                if (it.hasProperty('excludeRules')) {
+                  exclusions += it.excludeRules
+                }
+                if (!exclusions.empty) {
+                  def exclusionsNode = dependencyNode.appendNode('exclusions')
+                  for (ExcludeRule exclude : exclusions) {
+                    def exclusionNode = exclusionsNode.appendNode('exclusion')
+                    exclusionNode.appendNode('groupId', exclude.group)
+                    exclusionNode.appendNode('artifactId', exclude.module)
+                  }
                 }
               }
             }
 
+            // TODO: Should we use the runtime scope instead of the compile 
scope
+            // which forces all our consumers to declare what they consume?
+            generateDependenciesFromConfiguration(configuration: 'shadow', 
scope: 'compile')
+            generateDependenciesFromConfiguration(configuration: 'provided', 
scope: 'provided')
+
             // NB: This must come after asNode() logic, as it seems asNode()
             // removes XML comments.
             // TODO: Load this from file?


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 90048)
    Time Spent: 11h 50m  (was: 11h 40m)

> Use Gradle to build/release project
> -----------------------------------
>
>                 Key: BEAM-3249
>                 URL: https://issues.apache.org/jira/browse/BEAM-3249
>             Project: Beam
>          Issue Type: Improvement
>          Components: build-system, testing
>            Reporter: Luke Cwik
>            Assignee: Luke Cwik
>            Priority: Major
>          Time Spent: 11h 50m
>  Remaining Estimate: 0h
>
> I have collected data by running several builds against master using Gradle 
> and Maven without using Gradle's support for incremental builds.
> Gradle (mins)
> min: 25.04
> max: 160.14
> median: 45.78
> average: 52.19
> stdev: 30.80
> Maven (mins)
> min: 56.86
> max: 216.55
> median: 87.93
> average: 109.10
> stdev: 48.01
> I excluded a few timeouts (240 mins) that happened during the Maven build 
> from its numbers but we can see conclusively that Gradle is about twice as 
> fast for the build when compared to Maven when run using Jenkins.
> Original dev@ thread: 
> https://lists.apache.org/thread.html/225dddcfc78f39bbb296a0d2bbef1caf37e17677c7e5573f0b6fe253@%3Cdev.beam.apache.org%3E
> The data is available here 
> https://docs.google.com/spreadsheets/d/1MHVjF-xoI49_NJqEQakUgnNIQ7Qbjzu8Y1q_h3dbF1M/edit?usp=sharing



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to