ppkarwasz commented on code in PR #4719:
URL: https://github.com/apache/eventmesh/pull/4719#discussion_r1560813032


##########
build.gradle:
##########
@@ -139,7 +139,59 @@ allprojects {
     }
 }
 
-task tar(type: Tar) {
+tasks.register('dist') {
+    subprojects.forEach { subProject ->
+        dependsOn("${subProject.path}:jar")
+    }
+    def includedProjects =
+            ["eventmesh-common",
+             "eventmesh-meta:eventmesh-meta-api",
+             "eventmesh-metrics-plugin:eventmesh-metrics-api",
+             "eventmesh-protocol-plugin:eventmesh-protocol-api",
+             "eventmesh-retry:eventmesh-retry-api",
+             "eventmesh-runtime",
+             "eventmesh-security-plugin:eventmesh-security-api",
+             "eventmesh-spi",
+             "eventmesh-starter",
+             "eventmesh-storage-plugin:eventmesh-storage-api",
+             "eventmesh-trace-plugin:eventmesh-trace-api",
+             "eventmesh-webhook:eventmesh-webhook-api",
+             "eventmesh-webhook:eventmesh-webhook-admin",
+             "eventmesh-webhook:eventmesh-webhook-receive"]
+    outputs.dirs('dist/apps', 'dist/bin', 'dist/conf', 'dist/lib', 
'dist/licenses')
+    doLast {
+        includedProjects.each {
+            def project = findProject(it)
+            logger.lifecycle('Install module: module: {}', project.name)
+            copy {
+                from project.jar.archivePath
+                into 'dist/apps'
+            }
+            copy {
+                from project.file('bin')
+                into 'dist/bin'
+            }
+            copy {
+                from project.file('conf')
+                from project.sourceSets.main.resources.srcDirs
+                into 'dist/conf'
+                duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+                exclude 'META-INF'
+            }
+            copy {
+                from project.configurations.runtimeClasspath
+                into 'dist/lib'
+                exclude 'eventmesh*'
+            }

Review Comment:
   No, they are not.
   
   In the original **every** sub project had its own `dist` task that created 
temporary directories, such as `eventmesh-common/dist/lib`.
   
   Now there is only **one** `dist` task that creates a single distribution in 
the `dist` folder of the main project.
   Were the old `<project_name>/dist/lib` folders useful? I didn't think so, 
since they didn't contain enough data to make standalone distributions of the 
sub-projects.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to