You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/06/24 17:22:57 UTC

[GitHub] [geode] yozaner1324 opened a new pull request #5297: GEODE-8239 - Add gradle config to add 'Class-Path' and 'Dependent-Modules' attirbutes to manifest file

yozaner1324 opened a new pull request #5297:
URL: https://github.com/apache/geode/pull/5297


   
   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] yozaner1324 commented on a change in pull request #5297: GEODE-8239 - Add gradle config to add 'Class-Path' and 'Dependent-Modules' attirbutes to manifest file

Posted by GitBox <gi...@apache.org>.
yozaner1324 commented on a change in pull request #5297:
URL: https://github.com/apache/geode/pull/5297#discussion_r445075176



##########
File path: gradle/publish-java.gradle
##########
@@ -28,3 +28,41 @@ publishing {
     }
   }
 }
+
+gradle.taskGraph.whenReady({ graph ->
+  tasks.withType(Jar).each { jar ->
+    jar.doFirst {
+      def projectDependencies = []
+      def runtimeList = []
+
+      configurations.runtimeClasspath
+              .collect { it.name - ".jar" }
+              .each { dependency ->
+                if (dependency.startsWith("geode-")) {
+                  projectDependencies.add(dependency)
+                } else {
+                  runtimeList.add(dependency)
+                }
+              }
+
+      projectDependencies.clone().each { projectDependency ->
+        def geodeProject = projectDependency - "-${version}.jar"
+        if (projectDependencies.contains(geodeProject)) {
+          def parentProject = project(":$geodeProject" - "-$version")
+          if (parentProject != null) {
+            def collect = parentProject.configurations.runtimeClasspath.collect { it.name - ".jar" }
+            runtimeList.removeAll(collect)
+            projectDependencies.removeAll(collect)
+          }
+        }
+      }
+
+      manifest {
+        attributes.put("Class-Path", runtimeList.join(' '))

Review comment:
       Yes




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] rhoughton-pivot commented on a change in pull request #5297: GEODE-8239 - Add gradle config to add 'Class-Path' and 'Dependent-Modules' attirbutes to manifest file

Posted by GitBox <gi...@apache.org>.
rhoughton-pivot commented on a change in pull request #5297:
URL: https://github.com/apache/geode/pull/5297#discussion_r445061619



##########
File path: gradle/publish-java.gradle
##########
@@ -28,3 +28,41 @@ publishing {
     }
   }
 }
+
+gradle.taskGraph.whenReady({ graph ->
+  tasks.withType(Jar).each { jar ->
+    jar.doFirst {
+      def projectDependencies = []
+      def runtimeList = []
+
+      configurations.runtimeClasspath
+              .collect { it.name - ".jar" }
+              .each { dependency ->
+                if (dependency.startsWith("geode-")) {
+                  projectDependencies.add(dependency)
+                } else {
+                  runtimeList.add(dependency)
+                }
+              }
+
+      projectDependencies.clone().each { projectDependency ->

Review comment:
       Can we get a comment block on the logic of what is being pruned out from this list? I get it, but I also consulted on it in the first place

##########
File path: gradle/publish-java.gradle
##########
@@ -28,3 +28,41 @@ publishing {
     }
   }
 }
+
+gradle.taskGraph.whenReady({ graph ->
+  tasks.withType(Jar).each { jar ->
+    jar.doFirst {
+      def projectDependencies = []
+      def runtimeList = []
+
+      configurations.runtimeClasspath
+              .collect { it.name - ".jar" }
+              .each { dependency ->
+                if (dependency.startsWith("geode-")) {
+                  projectDependencies.add(dependency)
+                } else {
+                  runtimeList.add(dependency)
+                }
+              }
+
+      projectDependencies.clone().each { projectDependency ->
+        def geodeProject = projectDependency - "-${version}.jar"
+        if (projectDependencies.contains(geodeProject)) {
+          def parentProject = project(":$geodeProject" - "-$version")
+          if (parentProject != null) {
+            def collect = parentProject.configurations.runtimeClasspath.collect { it.name - ".jar" }
+            runtimeList.removeAll(collect)
+            projectDependencies.removeAll(collect)
+          }
+        }
+      }
+
+      manifest {
+        attributes.put("Class-Path", runtimeList.join(' '))

Review comment:
       Is Attributes.put() what avoids re-writing the entire block?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] kohlmu-pivotal commented on a change in pull request #5297: GEODE-8239 - Add gradle config to add 'Class-Path' and 'Dependent-Modules' attirbutes to manifest file

Posted by GitBox <gi...@apache.org>.
kohlmu-pivotal commented on a change in pull request #5297:
URL: https://github.com/apache/geode/pull/5297#discussion_r445075841



##########
File path: gradle/publish-java.gradle
##########
@@ -28,3 +28,41 @@ publishing {
     }
   }
 }
+
+gradle.taskGraph.whenReady({ graph ->
+  tasks.withType(Jar).each { jar ->
+    jar.doFirst {
+      def projectDependencies = []
+      def runtimeList = []
+
+      configurations.runtimeClasspath
+              .collect { it.name - ".jar" }
+              .each { dependency ->
+                if (dependency.startsWith("geode-")) {
+                  projectDependencies.add(dependency)
+                } else {
+                  runtimeList.add(dependency)
+                }
+              }
+
+      projectDependencies.clone().each { projectDependency ->

Review comment:
       ok.. we'll comment on what and how the pruning is happening.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] kohlmu-pivotal commented on a change in pull request #5297: GEODE-8239 - Add gradle config to add 'Class-Path' and 'Dependent-Modules' attirbutes to manifest file

Posted by GitBox <gi...@apache.org>.
kohlmu-pivotal commented on a change in pull request #5297:
URL: https://github.com/apache/geode/pull/5297#discussion_r445075557



##########
File path: gradle/publish-java.gradle
##########
@@ -28,3 +28,41 @@ publishing {
     }
   }
 }
+
+gradle.taskGraph.whenReady({ graph ->
+  tasks.withType(Jar).each { jar ->
+    jar.doFirst {
+      def projectDependencies = []
+      def runtimeList = []
+
+      configurations.runtimeClasspath
+              .collect { it.name - ".jar" }
+              .each { dependency ->
+                if (dependency.startsWith("geode-")) {
+                  projectDependencies.add(dependency)
+                } else {
+                  runtimeList.add(dependency)
+                }
+              }
+
+      projectDependencies.clone().each { projectDependency ->
+        def geodeProject = projectDependency - "-${version}.jar"
+        if (projectDependencies.contains(geodeProject)) {
+          def parentProject = project(":$geodeProject" - "-$version")
+          if (parentProject != null) {
+            def collect = parentProject.configurations.runtimeClasspath.collect { it.name - ".jar" }
+            runtimeList.removeAll(collect)
+            projectDependencies.removeAll(collect)
+          }
+        }
+      }
+
+      manifest {
+        attributes.put("Class-Path", runtimeList.join(' '))

Review comment:
       yes..




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] rhoughton-pivot commented on a change in pull request #5297: GEODE-8239 - Add gradle config to add 'Class-Path' and 'Dependent-Modules' attirbutes to manifest file

Posted by GitBox <gi...@apache.org>.
rhoughton-pivot commented on a change in pull request #5297:
URL: https://github.com/apache/geode/pull/5297#discussion_r445129237



##########
File path: gradle/publish-java.gradle
##########
@@ -28,3 +28,41 @@ publishing {
     }
   }
 }
+
+gradle.taskGraph.whenReady({ graph ->
+  tasks.withType(Jar).each { jar ->
+    jar.doFirst {
+      def projectDependencies = []
+      def runtimeList = []
+
+      configurations.runtimeClasspath
+              .collect { it.name - ".jar" }
+              .each { dependency ->
+                if (dependency.startsWith("geode-")) {
+                  projectDependencies.add(dependency)
+                } else {
+                  runtimeList.add(dependency)
+                }
+              }
+
+      projectDependencies.clone().each { projectDependency ->

Review comment:
       Perfect.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] kohlmu-pivotal merged pull request #5297: GEODE-8239 - Add gradle config to add 'Class-Path' and 'Dependent-Modules' attirbutes to manifest file

Posted by GitBox <gi...@apache.org>.
kohlmu-pivotal merged pull request #5297:
URL: https://github.com/apache/geode/pull/5297


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org