This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-paimon-webui.git


The following commit(s) were added to refs/heads/main by this push:
     new 5983426  [Fix] Fix some license issues (#12)
5983426 is described below

commit 5983426a1ceac7fdc0d02b5ed5f118bad902633d
Author: s7monk <[email protected]>
AuthorDate: Thu Jul 27 14:12:25 2023 +0800

    [Fix] Fix some license issues (#12)
---
 docker-compose.yml                                 | 15 +++++
 .../apache/paimon/web/api/table/TableManager.java  |  2 +-
 .../apache/paimon/web/api/table/TableMetadata.java |  9 ++-
 .../paimon/web/api/table/TableManagerTest.java     |  4 +-
 .../org/apache/paimon/web/common/enums/Status.java |  4 +-
 .../org/apache/paimon/web/common/result/R.java     |  8 +--
 paimon-web-server/src/main/assembly/package.xml    | 66 ++++++++++++++++++++++
 .../web/server/PaimonWebServerApplication.java     |  4 +-
 .../src/main/resources/application-dev.yml         |  6 +-
 .../src/main/resources/application-prod.yml        |  4 +-
 .../src/main/resources/application.yml             | 22 ++++++--
 .../server/PaimonWebServerApplicationTests.java    | 10 +---
 pom.xml                                            |  8 +--
 13 files changed, 126 insertions(+), 36 deletions(-)

diff --git a/docker-compose.yml b/docker-compose.yml
index 1c663ba..88ac8b3 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,3 +1,18 @@
+# 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.
+
 version: '3.9'
 services:
   mysql:
diff --git 
a/paimon-web-api/src/main/java/org/apache/paimon/web/api/table/TableManager.java
 
b/paimon-web-api/src/main/java/org/apache/paimon/web/api/table/TableManager.java
index 83188f5..287755d 100644
--- 
a/paimon-web-api/src/main/java/org/apache/paimon/web/api/table/TableManager.java
+++ 
b/paimon-web-api/src/main/java/org/apache/paimon/web/api/table/TableManager.java
@@ -64,7 +64,7 @@ public class TableManager {
         return catalog.tableExists(identifier);
     }
 
-    public static Table GetTable(Catalog catalog, String dbName, String 
tableName)
+    public static Table getTable(Catalog catalog, String dbName, String 
tableName)
             throws Catalog.TableNotExistException {
         Identifier identifier = Identifier.create(dbName, tableName);
         return catalog.getTable(identifier);
diff --git 
a/paimon-web-api/src/main/java/org/apache/paimon/web/api/table/TableMetadata.java
 
b/paimon-web-api/src/main/java/org/apache/paimon/web/api/table/TableMetadata.java
index 67ec73e..90ea33d 100644
--- 
a/paimon-web-api/src/main/java/org/apache/paimon/web/api/table/TableMetadata.java
+++ 
b/paimon-web-api/src/main/java/org/apache/paimon/web/api/table/TableMetadata.java
@@ -22,7 +22,13 @@ import com.google.common.base.Preconditions;
 
 import javax.annotation.Nullable;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 /** table metadata. */
@@ -142,6 +148,7 @@ public class TableMetadata {
         return new Builder();
     }
 
+    /** The builder for TableMetadata. */
     public static final class Builder {
         private List<ColumnMetadata> columns = new ArrayList<>();
 
diff --git 
a/paimon-web-api/src/test/java/org/apache/paimon/web/api/table/TableManagerTest.java
 
b/paimon-web-api/src/test/java/org/apache/paimon/web/api/table/TableManagerTest.java
index 8e4db37..a60ef27 100644
--- 
a/paimon-web-api/src/test/java/org/apache/paimon/web/api/table/TableManagerTest.java
+++ 
b/paimon-web-api/src/test/java/org/apache/paimon/web/api/table/TableManagerTest.java
@@ -135,12 +135,12 @@ public class TableManagerTest {
 
     @Test
     public void testGetTable() throws Catalog.TableNotExistException {
-        Table table = TableManager.GetTable(catalog, DB_NAME, DEFAULT_TABLE);
+        Table table = TableManager.getTable(catalog, DB_NAME, DEFAULT_TABLE);
         assertThat(table).isInstanceOf(Table.class);
 
         // Get table throws TableNotExistException when table does not exist
         assertThatExceptionOfType(Catalog.TableNotExistException.class)
-                .isThrownBy(() -> TableManager.GetTable(catalog, DB_NAME, 
TABLE_NAME))
+                .isThrownBy(() -> TableManager.getTable(catalog, DB_NAME, 
TABLE_NAME))
                 .withMessage("Table test_db.test_table does not exist.");
     }
 
diff --git 
a/paimon-web-common/src/main/java/org/apache/paimon/web/common/enums/Status.java
 
b/paimon-web-common/src/main/java/org/apache/paimon/web/common/enums/Status.java
index cb957d5..5de3d77 100644
--- 
a/paimon-web-common/src/main/java/org/apache/paimon/web/common/enums/Status.java
+++ 
b/paimon-web-common/src/main/java/org/apache/paimon/web/common/enums/Status.java
@@ -23,10 +23,10 @@ package org.apache.paimon.web.common.enums;
  *
  * <p><b>NOTE:</b> This enumeration is used to define status codes and 
internationalization messages
  * for response data. <br>
- * This is mainly responsible for the internationalization information 
returned by the interface
+ * This is mainly responsible for the internationalization information 
returned by the interface.
  */
 public enum Status {
-    /** response data msg */
+    /** response data msg. */
     SUCCESS(200, "Successfully"),
     FAILED(400, "Failed"),
 
diff --git 
a/paimon-web-common/src/main/java/org/apache/paimon/web/common/result/R.java 
b/paimon-web-common/src/main/java/org/apache/paimon/web/common/result/R.java
index fa2be30..c6ec251 100644
--- a/paimon-web-common/src/main/java/org/apache/paimon/web/common/result/R.java
+++ b/paimon-web-common/src/main/java/org/apache/paimon/web/common/result/R.java
@@ -22,14 +22,14 @@ import org.apache.paimon.web.common.enums.Status;
 
 import lombok.Data;
 
-/** result */
+/** result. */
 @Data
 public class R<T> {
-    /** result code */
+    /** result code. */
     private final int code;
-    /** result msg */
+    /** result msg. */
     private final String msg;
-    /** result data */
+    /** result data. */
     private final T data;
 
     public R(int code, String msg, T data) {
diff --git a/paimon-web-server/src/main/assembly/package.xml 
b/paimon-web-server/src/main/assembly/package.xml
new file mode 100644
index 0000000..accab46
--- /dev/null
+++ b/paimon-web-server/src/main/assembly/package.xml
@@ -0,0 +1,66 @@
+<!--
+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.
+-->
+<assembly>
+    <id>dist</id>
+    <formats>
+        <format>dir</format>
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+<!--        <fileSet>-->
+<!--            <directory>${basedir}/src/main/bin</directory>-->
+<!--            <lineEnding>unix</lineEnding>-->
+<!--            <outputDirectory>service</outputDirectory>-->
+<!--            <includes>-->
+<!--                <include>*.service</include>-->
+<!--            </includes>-->
+<!--        </fileSet>-->
+        <fileSet>
+            <directory>${basedir}/src/main/bin</directory>
+            <lineEnding>unix</lineEnding>
+            <outputDirectory/>
+            <fileMode>755</fileMode>
+            <includes>
+                <include>*.sh</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>${basedir}/src/main/bin</directory>
+            <lineEnding>windows</lineEnding>
+            <outputDirectory/>
+            <includes>
+                <include>*.bat</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>target/classes</directory>
+            <outputDirectory>config</outputDirectory>
+            <includes>
+                <include>**/*.yml</include>
+                <include>**/log4j2.xml</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>lib</outputDirectory>
+            <unpack>false</unpack>
+        </dependencySet>
+    </dependencySets>
+</assembly>
\ No newline at end of file
diff --git 
a/paimon-web-server/src/main/java/org/apache/paimon/web/server/PaimonWebServerApplication.java
 
b/paimon-web-server/src/main/java/org/apache/paimon/web/server/PaimonWebServerApplication.java
index 261cf84..96c44a0 100644
--- 
a/paimon-web-server/src/main/java/org/apache/paimon/web/server/PaimonWebServerApplication.java
+++ 
b/paimon-web-server/src/main/java/org/apache/paimon/web/server/PaimonWebServerApplication.java
@@ -21,12 +21,12 @@ package org.apache.paimon.web.server;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
-/** Paimon Manager Server Application . */
+/** Paimon Manager Server Application. */
 @SpringBootApplication
 public class PaimonWebServerApplication {
 
     /**
-     * Main .
+     * Main.
      *
      * @param args args
      */
diff --git a/paimon-web-server/src/main/resources/application-dev.yml 
b/paimon-web-server/src/main/resources/application-dev.yml
index 3166d34..090a98f 100644
--- a/paimon-web-server/src/main/resources/application-dev.yml
+++ b/paimon-web-server/src/main/resources/application-dev.yml
@@ -1,4 +1,3 @@
-#
 # 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.
@@ -6,18 +5,17 @@
 # (the "License"); you may not use this file except in compliance with
 # the License.  You may obtain a copy of the License at
 #
-#    https://www.apache.org/licenses/LICENSE-2.0
+#    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.
-#
 
 spring:
   datasource:
     url: 
jdbc:mysql://${MYSQL_ADDR:localhost:3306}/${MYSQL_DATABASE:paimon}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
     username: ${MYSQL_USERNAME:root}
-    password: ${MYSQL_PASSWORD:paimon@123}
+    password: ${MYSQL_PASSWORD:root}
     driver-class-name: com.mysql.cj.jdbc.Driver
\ No newline at end of file
diff --git a/paimon-web-server/src/main/resources/application-prod.yml 
b/paimon-web-server/src/main/resources/application-prod.yml
index da71f5a..9e87e23 100644
--- a/paimon-web-server/src/main/resources/application-prod.yml
+++ b/paimon-web-server/src/main/resources/application-prod.yml
@@ -1,4 +1,3 @@
-#
 # 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.
@@ -6,14 +5,13 @@
 # (the "License"); you may not use this file except in compliance with
 # the License.  You may obtain a copy of the License at
 #
-#    https://www.apache.org/licenses/LICENSE-2.0
+#    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.
-#
 
 spring:
   datasource:
diff --git a/paimon-web-server/src/main/resources/application.yml 
b/paimon-web-server/src/main/resources/application.yml
index 4f11739..4342834 100644
--- a/paimon-web-server/src/main/resources/application.yml
+++ b/paimon-web-server/src/main/resources/application.yml
@@ -1,12 +1,24 @@
-#################################################################################################################
-################################################# Common Config 
#################################################
-#################################################################################################################
-# Paimon Manager Service Port
+# 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 Web Service Port
 server:
   port: 10088
 
 spring:
-  # Paimon Manager Service Name
+  # Paimon Web Service Name
   application:
     name: PaimonManager
   profiles:
diff --git 
a/paimon-web-server/src/test/java/org/apache/paimon/web/server/PaimonWebServerApplicationTests.java
 
b/paimon-web-server/src/test/java/org/apache/paimon/web/server/PaimonWebServerApplicationTests.java
index 510e626..df82fd5 100644
--- 
a/paimon-web-server/src/test/java/org/apache/paimon/web/server/PaimonWebServerApplicationTests.java
+++ 
b/paimon-web-server/src/test/java/org/apache/paimon/web/server/PaimonWebServerApplicationTests.java
@@ -19,14 +19,8 @@
 
 package org.apache.paimon.web.server;
 
-import org.junit.jupiter.api.Test;
 import org.springframework.boot.test.context.SpringBootTest;
 
-/** Paimon Manager Server Application Tests . */
+/** Paimon Web Server Application Tests. */
 @SpringBootTest
-class PaimonWebServerApplicationTests {
-
-    /** Context loads. */
-    @Test
-    void contextLoads() {}
-}
+class PaimonWebServerApplicationTests {}
diff --git a/pom.xml b/pom.xml
index 4e7739a..6fbec7d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -327,15 +327,15 @@ under the License.
                         <exclude>docs/static/js/anchor.min.js</exclude>
                         <exclude>docs/layouts/shortcodes/generated/**</exclude>
                         <exclude>**/*.svg</exclude>
+                        <exclude>**/*.cjs</exclude>
+                        <exclude>**/*.json</exclude>
+                        <exclude>**/*.sql</exclude>
                         <exclude>*/dependency-reduced-pom.xml</exclude>
                         <!-- Bundled license files -->
                         <exclude>**/LICENSE*</exclude>
                         <!-- artifacts created during release process -->
                         <exclude>release/**</exclude>
-                        <!-- antlr grammar files -->
-                        <exclude>paimon-common/src/main/antlr4/**</exclude>
-                        <!-- Test files -->
-                        
<exclude>paimon-common/src/test/resources/codesplit/**</exclude>
+                        <exclude>paimon-web-ui/node_modules/**</exclude>
                     </excludes>
                 </configuration>
             </plugin>

Reply via email to