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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7f708f856 [ci] Add licensing check (#839)
7f708f856 is described below

commit 7f708f856287276dee44e9a2b36e8ffa9a5938c5
Author: Jingsong Lee <[email protected]>
AuthorDate: Thu Apr 6 18:09:17 2023 +0800

    [ci] Add licensing check (#839)
---
 .github/workflows/check-licensing.yml              | 50 ++++++++++++++++++++++
 paimon-benchmark/paimon-micro-benchmarks/pom.xml   |  8 ++++
 paimon-codegen/src/main/resources/META-INF/NOTICE  | 11 +++++
 paimon-e2e-tests/pom.xml                           |  8 ++++
 paimon-filesystems/paimon-oss-impl/pom.xml         | 10 ++---
 .../src/main/resources/META-INF/NOTICE             |  2 +
 paimon-filesystems/paimon-s3-impl/pom.xml          |  3 +-
 .../src/main/resources/META-INF/NOTICE             |  3 ++
 pom.xml                                            | 29 +++++++++++++
 tools/ci/log4j.properties                          | 43 +++++++++++++++++++
 10 files changed, 161 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/check-licensing.yml 
b/.github/workflows/check-licensing.yml
new file mode 100644
index 000000000..305a6b66c
--- /dev/null
+++ b/.github/workflows/check-licensing.yml
@@ -0,0 +1,50 @@
+# 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.
+
+name: Check licensing
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    env:
+      MVN_COMMON_OPTIONS: -U -B --no-transfer-progress
+      MVN_BUILD_OUTPUT_FILE: "/tmp/mvn_build_output.out"
+      MVN_VALIDATION_DIR: "/tmp/paimon-validation-deployment"
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Set JDK
+        uses: actions/setup-java@v2
+        with:
+          java-version: 8
+          distribution: 'temurin'
+          cache: 'maven'
+
+      - name: Build
+        run: |
+          set -o pipefail
+
+          ./mvnw clean deploy ${{ env.MVN_COMMON_OPTIONS }} 
-Dmaven.test.skip=true \
+            -DaltDeploymentRepository=validation_repository::default::file:${{ 
env.MVN_VALIDATION_DIR }} \
+            | tee ${{ env.MVN_BUILD_OUTPUT_FILE }}
+
+      - name: Check licensing
+        run: |
+          ./mvnw ${{ env.MVN_COMMON_OPTIONS }} exec:java@check-licensing -N \
+            -Dexec.args="${{ env.MVN_BUILD_OUTPUT_FILE }} $(pwd) ${{ 
env.MVN_VALIDATION_DIR }}" \
+            -Dlog4j.configurationFile=file://$(pwd)/tools/ci/log4j.properties
diff --git a/paimon-benchmark/paimon-micro-benchmarks/pom.xml 
b/paimon-benchmark/paimon-micro-benchmarks/pom.xml
index 6daf42067..972547299 100644
--- a/paimon-benchmark/paimon-micro-benchmarks/pom.xml
+++ b/paimon-benchmark/paimon-micro-benchmarks/pom.xml
@@ -163,6 +163,14 @@ under the License.
 
     <build>
         <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
diff --git a/paimon-codegen/src/main/resources/META-INF/NOTICE 
b/paimon-codegen/src/main/resources/META-INF/NOTICE
new file mode 100644
index 000000000..130fcf845
--- /dev/null
+++ b/paimon-codegen/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,11 @@
+paimon-codegen
+Copyright 2023-2023 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+The following dependencies all share the same BSD license which you find under 
licenses/LICENSE.scala.
+
+- org.scala-lang:scala-compiler:2.12.7
+- org.scala-lang:scala-library:2.12.7
+- org.scala-lang:scala-reflect:2.12.7
diff --git a/paimon-e2e-tests/pom.xml b/paimon-e2e-tests/pom.xml
index af3c2706d..1ccfb7c26 100644
--- a/paimon-e2e-tests/pom.xml
+++ b/paimon-e2e-tests/pom.xml
@@ -103,6 +103,14 @@ under the License.
 
     <build>
         <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
diff --git a/paimon-filesystems/paimon-oss-impl/pom.xml 
b/paimon-filesystems/paimon-oss-impl/pom.xml
index 7094e198e..6cd40ca05 100644
--- a/paimon-filesystems/paimon-oss-impl/pom.xml
+++ b/paimon-filesystems/paimon-oss-impl/pom.xml
@@ -38,15 +38,15 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.paimon</groupId>
-            <artifactId>paimon-common</artifactId>
+            <artifactId>paimon-hadoop-shaded</artifactId>
             <version>${project.version}</version>
-            <scope>provided</scope>
         </dependency>
 
         <dependency>
             <groupId>org.apache.paimon</groupId>
-            <artifactId>paimon-hadoop-shaded</artifactId>
+            <artifactId>paimon-common</artifactId>
             <version>${project.version}</version>
+            <scope>provided</scope>
         </dependency>
 
         <dependency>
@@ -59,7 +59,7 @@
                     <artifactId>aliyun-oss-sdk</artifactId>
                 </exclusion>
                 <exclusion>
-                    <!-- provided by flink-fs-hadoop-shaded -->
+                    <!-- provided by paimon-hadoop-shaded -->
                     <groupId>org.apache.hadoop</groupId>
                     <artifactId>hadoop-common</artifactId>
                 </exclusion>
@@ -119,7 +119,7 @@
                             <relocations>
                                 <relocation>
                                     <pattern>org.apache.hadoop</pattern>
-                                    
<shadedPattern>org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop</shadedPattern>
+                                    
<shadedPattern>org.apache.paimon.shaded.hadoop3.org.apache.hadoop</shadedPattern>
                                 </relocation>
                                 <!-- relocate the OSS dependencies -->
                                 <relocation>
diff --git 
a/paimon-filesystems/paimon-oss-impl/src/main/resources/META-INF/NOTICE 
b/paimon-filesystems/paimon-oss-impl/src/main/resources/META-INF/NOTICE
index 43540f77a..e8ca2b7c9 100644
--- a/paimon-filesystems/paimon-oss-impl/src/main/resources/META-INF/NOTICE
+++ b/paimon-filesystems/paimon-oss-impl/src/main/resources/META-INF/NOTICE
@@ -6,6 +6,8 @@ The Apache Software Foundation (http://www.apache.org/).
 
 This project bundles the following dependencies under the Apache Software 
License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
 
+- org.apache.hadoop:hadoop-common:3.3.4
+- org.apache.hadoop.thirdparty:hadoop-shaded-protobuf_3_7:1.1.1
 - com.aliyun.oss:aliyun-sdk-oss:3.13.2
 - com.aliyun:aliyun-java-sdk-core:4.5.10
 - com.aliyun:aliyun-java-sdk-kms:2.11.0
diff --git a/paimon-filesystems/paimon-s3-impl/pom.xml 
b/paimon-filesystems/paimon-s3-impl/pom.xml
index 8202b17dd..b0ae1d01e 100644
--- a/paimon-filesystems/paimon-s3-impl/pom.xml
+++ b/paimon-filesystems/paimon-s3-impl/pom.xml
@@ -364,6 +364,7 @@
                                         <exclude>mime.types</exclude>
                                         <exclude>mozilla/**</exclude>
                                         <exclude>META-INF/maven/**</exclude>
+                                        
<exclude>META-INF/versions/11/META-INF/maven/**</exclude>
                                         <exclude>META-INF/LICENSE.txt</exclude>
                                     </excludes>
                                 </filter>
@@ -378,7 +379,7 @@
                                 </filter>
                                 <filter>
                                     
<artifact>com.amazonaws:aws-java-sdk-s3</artifact>
-                                    <!-- Make sure we are using the overridden 
XmlResponsesSaxParser of flink-s3-fs-base.
+                                    <!-- Make sure we are using the overridden 
XmlResponsesSaxParser.
                                         Filter must be removed as soon as 
XmlResponsesSaxParser of this module is
                                         dropped, for example when 
discontinuing support for Java 8. -->
                                     <excludes>
diff --git 
a/paimon-filesystems/paimon-s3-impl/src/main/resources/META-INF/NOTICE 
b/paimon-filesystems/paimon-s3-impl/src/main/resources/META-INF/NOTICE
index 2ce34ae65..dbc8377eb 100644
--- a/paimon-filesystems/paimon-s3-impl/src/main/resources/META-INF/NOTICE
+++ b/paimon-filesystems/paimon-s3-impl/src/main/resources/META-INF/NOTICE
@@ -1,6 +1,9 @@
 paimon-s3-impl
 Copyright 2023-2023 The Apache Software Foundation
 
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
 This project bundles the following dependencies under the Apache Software 
License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
 
 - com.amazonaws:aws-java-sdk-core:1.12.319
diff --git a/pom.xml b/pom.xml
index 39e4e0544..cdf50fb99 100644
--- a/pom.xml
+++ b/pom.xml
@@ -812,6 +812,35 @@ under the License.
                         </execution>
                     </executions>
                 </plugin>
+
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>exec-maven-plugin</artifactId>
+                    <version>3.1.0</version>
+                    <inherited>false</inherited>
+                    <executions>
+                        <execution>
+                            <id>check-license</id>
+                            <!-- manually called -->
+                            <phase>none</phase>
+                            <goals>
+                                <goal>java</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                    <configuration>
+                        
<mainClass>org.apache.paimon.tools.ci.licensecheck.LicenseChecker</mainClass>
+                        
<includePluginDependencies>true</includePluginDependencies>
+                        
<includeProjectDependencies>false</includeProjectDependencies>
+                    </configuration>
+                    <dependencies>
+                        <dependency>
+                            <groupId>org.apache.paimon</groupId>
+                            <artifactId>paimon-ci-tools</artifactId>
+                            <version>${project.version}</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
             </plugins>
         </pluginManagement>
     </build>
diff --git a/tools/ci/log4j.properties b/tools/ci/log4j.properties
new file mode 100644
index 000000000..7daf1c336
--- /dev/null
+++ b/tools/ci/log4j.properties
@@ -0,0 +1,43 @@
+################################################################################
+#  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.
+################################################################################
+
+rootLogger.level = INFO
+rootLogger.appenderRef.out.ref = ConsoleAppender
+
+# -----------------------------------------------------------------------------
+# Console (use 'console')
+# -----------------------------------------------------------------------------
+
+appender.console.name = ConsoleAppender
+appender.console.type = CONSOLE
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{HH:mm:ss,SSS} [%20t] %-5p %-60c %x - %m%n
+
+# -----------------------------------------------------------------------------
+# File (use 'file')
+# -----------------------------------------------------------------------------
+appender.file.name = FileAppender
+appender.file.type = FILE
+appender.file.fileName = ${sys:log.dir}/mvn-${sys:mvn.forkNumber:-output}.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d{HH:mm:ss,SSS} [%20t] %-5p %-60c %x - %m%n
+appender.file.createOnDemand = true
+
+# suppress the irrelevant (wrong) warnings from the netty channel handler
+logger.netty.name = org.jboss.netty.channel.DefaultChannelPipeline
+logger.netty.level = ERROR

Reply via email to