zhongjiajie commented on code in PR #15004:
URL: 
https://github.com/apache/dolphinscheduler/pull/15004#discussion_r1352285888


##########
dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml:
##########
@@ -67,16 +67,28 @@
         <fileSet>
             
<directory>${basedir}/../dolphinscheduler-tools/target/tools</directory>
             <outputDirectory>tools</outputDirectory>
+            <excludes>
+                <exclude>libs/</exclude>
+                <exclude>bin/</exclude>
+                <exclude>dist-bin/</exclude>
+            </excludes>
         </fileSet>
-
         <fileSet>
-            
<directory>${basedir}/../dolphinscheduler-dist/target/dolphinscheduler-dist-${project.version}</directory>
-            <outputDirectory>.</outputDirectory>
+            
<directory>${basedir}/../dolphinscheduler-tools/target/tools/libs</directory>
+            <outputDirectory>tools/libs</outputDirectory>
+            <includes>
+                <include>dolphinscheduler-*.jar</include>
+                <include>spring-*.jar</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            
<directory>${basedir}/../dolphinscheduler-tools/target/tools/dist-bin</directory>
+            <outputDirectory>tools/bin</outputDirectory>

Review Comment:
   In binary package module `tools`, we only need some spring jar and use dir 
`dist-bin` to load libs from others server



##########
dolphinscheduler-tools/src/main/dist-bin/migrate-resource.sh:
##########
@@ -0,0 +1,42 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+BIN_DIR=$(dirname $0)
+DOLPHINSCHEDULER_HOME=${DOLPHINSCHEDULER_HOME:-$(cd $BIN_DIR/../..; pwd)}
+
+if [ "$DOCKER" != "true" ]; then
+  source "$DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh"
+fi
+
+JAVA_OPTS=${JAVA_OPTS:-"-server -Duser.timezone=${SPRING_JACKSON_TIME_ZONE} 
-Xms1g -Xmx1g -Xmn512m -XX:+PrintGCDetails -Xloggc:gc.log 
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof"}
+
+# TODO temp solution to may our tarball small enough to pass ASF release 
policy, for more detail see: 
https://lists.apache.org/thread/rmp7fghlj0n7h9y2v3p8gkw9f9qbo6qt
+CP=$DOLPHINSCHEDULER_HOME/tools/libs/*
+for d in api-server; do
+  for f in $DOLPHINSCHEDULER_HOME/$d/libs/*.jar; do
+    JAR_FILE_NAME=${f##*/}
+    if [[ ! $CP =~ $JAR_FILE_NAME ]] && [[ ! $JAR_FILE_NAME =~ 
"dolphinscheduler-" ]] && [[ ! $JAR_FILE_NAME == "spring"* ]]; then
+      CP=$CP:$f
+    fi
+  done
+done

Review Comment:
   load all libs in `api-server` exclusion `dolphinscheduler-*` and `^spring*` 
to avoid launch service from api-server



##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/metrics/TaskMetrics.java:
##########
@@ -24,7 +24,7 @@
 
 import lombok.experimental.UtilityClass;
 
-import com.facebook.presto.jdbc.internal.guava.collect.ImmutableSet;
+import com.google.common.collect.ImmutableSet;

Review Comment:
   remove dependence module `dolphinscheduler-task-all` and some of lib not 
exists anymore. so we have to change some code 



##########
dolphinscheduler-master/pom.xml:
##########
@@ -65,12 +65,7 @@
 
         <dependency>
             <groupId>org.apache.dolphinscheduler</groupId>
-            <artifactId>dolphinscheduler-task-all</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.dolphinscheduler</groupId>
-            <artifactId>dolphinscheduler-storage-all</artifactId>

Review Comment:
   master do not need storage module



##########
dolphinscheduler-task-plugin/dolphinscheduler-task-all-prune/pom.xml:
##########
@@ -0,0 +1,425 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.dolphinscheduler</groupId>
+        <artifactId>dolphinscheduler-task-plugin</artifactId>
+        <version>dev-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>dolphinscheduler-task-all-prune</artifactId>

Review Comment:
   not sure whether exists a better way to do that or not
   
   ```java
           <dependency>
                <groupId>org.apache.dolphinscheduler</groupId>
                <artifactId>dolphinscheduler-task-dataquality</artifactId>
                <version>${project.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
   ```
   
   we exclude all libs but only keep `dolphinscheduler-task-*` themself



##########
dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml:
##########
@@ -67,16 +67,28 @@
         <fileSet>
             
<directory>${basedir}/../dolphinscheduler-tools/target/tools</directory>
             <outputDirectory>tools</outputDirectory>
+            <excludes>
+                <exclude>libs/</exclude>
+                <exclude>bin/</exclude>
+                <exclude>dist-bin/</exclude>
+            </excludes>
         </fileSet>
-
         <fileSet>
-            
<directory>${basedir}/../dolphinscheduler-dist/target/dolphinscheduler-dist-${project.version}</directory>
-            <outputDirectory>.</outputDirectory>
+            
<directory>${basedir}/../dolphinscheduler-tools/target/tools/libs</directory>
+            <outputDirectory>tools/libs</outputDirectory>
+            <includes>
+                <include>dolphinscheduler-*.jar</include>
+                <include>spring-*.jar</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            
<directory>${basedir}/../dolphinscheduler-tools/target/tools/dist-bin</directory>
+            <outputDirectory>tools/bin</outputDirectory>
         </fileSet>
 
         <fileSet>
-            <directory>${basedir}/../dolphinscheduler-ui/dist</directory>
-            <outputDirectory>./ui</outputDirectory>
+            
<directory>${basedir}/../dolphinscheduler-dist/target/dolphinscheduler-dist-${project.version}</directory>
+            <outputDirectory>.</outputDirectory>

Review Comment:
   remove ui directory in the root level of package, cause we already have the 
most use one under `api-server`



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

Reply via email to