From 842d4af981505de784c0cb4010c9162bc28e9451 Mon Sep 17 00:00:00 2001 From: yangyang zhong <35210666+hdygxsj@users.noreply.github.com> Date: Tue, 28 May 2024 20:00:10 +0800 Subject: [PATCH 1/4] [Feature] Use assembly to build when profile is release --- .gitignore | 2 +- paimon-web-dist/pom.xml | 72 +++++++++++++++ .../src/main/assembly/paimon-web-bin.xml | 44 +++++++++ .../src/main/assembly/paimon-web-src.xml | 89 +++++++++++++++++++ paimon-web-server/pom.xml | 34 ++----- .../{package.xml => paimon-web-server.xml} | 30 +++---- paimon-web-server/src/main/bin/env.sh | 29 ++++++ paimon-web-server/src/main/bin/start.sh | 49 ++++++++++ paimon-web-ui/pom.xml | 8 +- pom.xml | 1 + 10 files changed, 309 insertions(+), 49 deletions(-) create mode 100644 paimon-web-dist/pom.xml create mode 100644 paimon-web-dist/src/main/assembly/paimon-web-bin.xml create mode 100644 paimon-web-dist/src/main/assembly/paimon-web-src.xml rename paimon-web-server/src/main/assembly/{package.xml => paimon-web-server.xml} (69%) create mode 100644 paimon-web-server/src/main/bin/env.sh create mode 100644 paimon-web-server/src/main/bin/start.sh diff --git a/.gitignore b/.gitignore index abbbee710..8edda19f5 100644 --- a/.gitignore +++ b/.gitignore @@ -43,7 +43,7 @@ target dependency-reduced-pom.xml *.dependency-reduced-pom.xml !.idea/paimon.svg - +**/dist/** # Logs logs *.log diff --git a/paimon-web-dist/pom.xml b/paimon-web-dist/pom.xml new file mode 100644 index 000000000..f01cd89d4 --- /dev/null +++ b/paimon-web-dist/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + + + org.apache.paimon + paimon-webui + 0.1-SNAPSHOT + + + paimon-web-dist + Paimon : Web : Dist + + + + org.apache.paimon + paimon-web-server + ${project.version} + + + + + apache-paimon-webui-${project.version} + + + + + release + + + + maven-assembly-plugin + + + paimon-web-bin + + single + + package + + + + src/main/assembly/paimon-web-bin.xml + + true + + + + + src + + single + + package + + + src/main/assembly/paimon-web-src.xml + + true + + + + + + + + + + + \ No newline at end of file diff --git a/paimon-web-dist/src/main/assembly/paimon-web-bin.xml b/paimon-web-dist/src/main/assembly/paimon-web-bin.xml new file mode 100644 index 000000000..d98699bac --- /dev/null +++ b/paimon-web-dist/src/main/assembly/paimon-web-bin.xml @@ -0,0 +1,44 @@ + + + + bin + + tar.gz + + true + ${project.build.finalName}-bin + + + + ${basedir}/../paimon-web-server/target/paimon-web-server + . + + + ${basedir}/../script/sql + conf/sql + 0755 + 0755 + + + ${basedir}/release-docs + . + + + \ No newline at end of file diff --git a/paimon-web-dist/src/main/assembly/paimon-web-src.xml b/paimon-web-dist/src/main/assembly/paimon-web-src.xml new file mode 100644 index 000000000..828aa28e9 --- /dev/null +++ b/paimon-web-dist/src/main/assembly/paimon-web-src.xml @@ -0,0 +1,89 @@ + + + + src + + tar.gz + + true + ${project.build.finalName}-src + + + + ${basedir}/../ + true + + **/* + + + + **/.github/** + .travis.yml + + + **/target/** + **/*.class + **/*.jar + **/*.war + **/*.zip + **/*.tar + **/*.tar.gz + **/node/** + **/node_modules/** + **/dist/** + + + release.properties + **/pom.xml.releaseBackup + *.gpg + + + **/dolphinscheduler-ui/dist/** + **/dolphinscheduler-ui/node/** + **/dolphinscheduler-ui/node_modules/** + + + **/.settings/** + **/.project + **/.classpath + + + **/.idea/** + **/*.ipr + **/*.iml + **/*.iws + + + **/logs/** + **/*.log + **/*.doc + **/*.cache + **/*.diff + **/*.patch + **/*.tmp + + + **/.DS_Store + **/Thumbs.db + + + + diff --git a/paimon-web-server/pom.xml b/paimon-web-server/pom.xml index ebd3c7f10..98aa516f6 100644 --- a/paimon-web-server/pom.xml +++ b/paimon-web-server/pom.xml @@ -58,6 +58,12 @@ under the License. ${project.version} + + org.apache.paimon + paimon-web-ui + ${project.version} + + cn.hutool hutool-all @@ -256,7 +262,7 @@ under the License. ${project.basedir}/src/test/resources - ${project.artifactId}-${project.version} + ${project.artifactId} true @@ -309,7 +315,7 @@ under the License. false - src/main/assembly/package.xml + src/main/assembly/paimon-web-server.xml @@ -323,30 +329,6 @@ under the License. - - org.apache.maven.plugins - maven-resources-plugin - ${maven.resource.version} - - - copy-static - - copy-resources - - initialize - - src/main/resources/static - true - - - ../paimon-web-ui/dist - - - - - - - org.apache.maven.plugins maven-jar-plugin diff --git a/paimon-web-server/src/main/assembly/package.xml b/paimon-web-server/src/main/assembly/paimon-web-server.xml similarity index 69% rename from paimon-web-server/src/main/assembly/package.xml rename to paimon-web-server/src/main/assembly/paimon-web-server.xml index accab4654..7a6988e21 100644 --- a/paimon-web-server/src/main/assembly/package.xml +++ b/paimon-web-server/src/main/assembly/paimon-web-server.xml @@ -17,49 +17,39 @@ specific language governing permissions and limitations under the License. --> - dist + server dir false - - - - - - - - ${basedir}/src/main/bin unix - + bin 755 *.sh - - ${basedir}/src/main/bin - windows - - - *.bat - - + target/classes config **/*.yml - **/log4j2.xml + **/log4j2-spring.xml + **/*.properties + + ${basedir}/../paimon-web-ui/dist + ./ui + - lib + libs false diff --git a/paimon-web-server/src/main/bin/env.sh b/paimon-web-server/src/main/bin/env.sh new file mode 100644 index 000000000..1419a8688 --- /dev/null +++ b/paimon-web-server/src/main/bin/env.sh @@ -0,0 +1,29 @@ +#!/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. +# + +# Set the FLINK_HOME directory to execute the flink command to submit the cdc job. +FLINK_HOME= + +# Set the ACTION_JAR_PATH to execute the paimon action job. +ACTION_JAR_PATH= + +JVM_ARGS="-server" + +JAVA_OPTS=${JAVA_OPTS:-"${JVM_ARGS}"} + +JAVA_HOME= \ No newline at end of file diff --git a/paimon-web-server/src/main/bin/start.sh b/paimon-web-server/src/main/bin/start.sh new file mode 100644 index 000000000..e627ec22f --- /dev/null +++ b/paimon-web-server/src/main/bin/start.sh @@ -0,0 +1,49 @@ +#!/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. +# + +PAIMON_UI_HOME="${PAIMON_UI_HOME:-$(pwd)}" +source ${PAIMON_UI_HOME}/bin/env.sh + +if [[ "$DOCKER" == "true" ]]; then + JAVA_OPTS="${JAVA_OPTS} -XX:-UseContainerSupport" +fi + +echo "JAVA_HOME=${JAVA_HOME}" +echo "JAVA_OPTS=${JAVA_OPTS}" +echo "PAIMON_UI_HOME=${PAIMON_UI_HOME}" +echo "FLINK_HOME=${PAIMON_UI_HOME}" +echo "ACTION_JAR_PATH=${PAIMON_UI_HOME}" + +if [ -z "$PAIMON_UI_HOME" ]; then + echo "PAIMON_UI_HOME is null, exit..." + exit 1 +fi +if [ -z "$JAVA_HOME" ]; then + echo "JAVA_HOME is null, exit..." + exit 1 +fi +if [ -z "$FLINK_HOME" ]; then + echo "FLINK_HOME is null, CDC cannot be used normally!" +fi +if [ -z "$ACTION_JAR_PATH" ]; then + echo "ACTION_JAR_PATH is null, CDC cannot be used normally!" +fi + +$JAVA_HOME/bin/java $JAVA_OPTS \ + -cp "$PAIMON_UI_HOME/conf":"$PAIMON_UI_HOME/libs/*" \ + org.apache.paimon.web.server.PaimonWebServerApplication \ No newline at end of file diff --git a/paimon-web-ui/pom.xml b/paimon-web-ui/pom.xml index 4ea96da4f..427abfab1 100644 --- a/paimon-web-ui/pom.xml +++ b/paimon-web-ui/pom.xml @@ -29,18 +29,19 @@ under the License. paimon-web-ui - pom + Paimon : Web : UI v18.0.0 9.4.1 1.12.0 + false - web + release ${project.artifactId}-${project.version} @@ -48,6 +49,9 @@ under the License. com.github.eirslett frontend-maven-plugin ${frontend-maven-plugin.version} + + ${build.ui.skip} + install node and npm diff --git a/pom.xml b/pom.xml index 7862f7944..bdf9f5336 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,7 @@ under the License. 4.0.0 + paimon-web-dist paimon-web-ui paimon-web-server paimon-web-common From 2c0b7facce578874b7a5f0a5fa32862daecb05b5 Mon Sep 17 00:00:00 2001 From: yangyang zhong <35210666+hdygxsj@users.noreply.github.com> Date: Fri, 7 Jun 2024 09:51:33 +0800 Subject: [PATCH 2/4] [Feature] fix --- paimon-web-dist/src/main/assembly/paimon-web-src.xml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/paimon-web-dist/src/main/assembly/paimon-web-src.xml b/paimon-web-dist/src/main/assembly/paimon-web-src.xml index 828aa28e9..4259545a3 100644 --- a/paimon-web-dist/src/main/assembly/paimon-web-src.xml +++ b/paimon-web-dist/src/main/assembly/paimon-web-src.xml @@ -56,9 +56,9 @@ *.gpg - **/dolphinscheduler-ui/dist/** - **/dolphinscheduler-ui/node/** - **/dolphinscheduler-ui/node_modules/** + **/paimon-ui/dist/** + **/paimon-ui/node/** + **/paimon-ui/node_modules/** **/.settings/** @@ -80,9 +80,6 @@ **/*.patch **/*.tmp - - **/.DS_Store - **/Thumbs.db From 62eb2a27c0516d9ab4bfa6e289b6489b034c828c Mon Sep 17 00:00:00 2001 From: yangyang zhong <35210666+hdygxsj@users.noreply.github.com> Date: Fri, 7 Jun 2024 09:54:46 +0800 Subject: [PATCH 3/4] [Feature] fix --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8edda19f5..b96d79926 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ paimon-web-ui/components.d.ts paimon-web-ui/.eslintrc-auto-import.json paimon-web-ui/httpData paimon-web-ui/apiWeb.json +paimon-web-server/src/main/resources/static/** logs/* .mvn/ .www From bc9145c5771cf7c8905d94d652bd3ad14d8313e2 Mon Sep 17 00:00:00 2001 From: yangyang zhong <35210666+hdygxsj@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:47:42 +0800 Subject: [PATCH 4/4] [Feature] fix --- paimon-web-dist/pom.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/paimon-web-dist/pom.xml b/paimon-web-dist/pom.xml index f01cd89d4..6e7aaf7ac 100644 --- a/paimon-web-dist/pom.xml +++ b/paimon-web-dist/pom.xml @@ -1,4 +1,20 @@ +