asdf2014 commented on a change in pull request #1210:
URL: 
https://github.com/apache/incubator-seatunnel/pull/1210#discussion_r807526040



##########
File path: bin/license.py
##########
@@ -0,0 +1,364 @@
+#!/usr/bin/env python3
+
+# 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.
+
+import sys
+
+if len(sys.argv) - 1 != 2:
+    print("The length of arguments should be 2!")
+    print("The first argument should be the path to the THIRD-PARTY.txt file.")
+    print("The second argument should be the path to the LICENSE file.")
+    exit(-1)
+
+third_party = sys.argv[1]
+license = sys.argv[2]
+
+with open(third_party, "r") as f:
+    licenses = f.readlines()
+
+licenses_keyword_map = {
+    "Apache 2.0 License": ["Apache", "APL2"],
+    "MIT License": ["MIT"],
+    "BSD License": ["BSD"],
+    "CC0-1.0 License": ["CC0"],
+    "CDDL License": ["CDDL"],
+    "Eclipse Public License": ["Eclipse"],
+    "Public Domain License": ["Public Domain"],
+    "Mozilla Public License Version 2.0": ["Mozilla Public License"],
+    "Go License": ["The Go license"],
+    "Unicode License": ["Unicode/ICU License"]
+}
+unknown_licenses_map = {
+    "commons-beanutils:commons-beanutils:1.7.0": "(Apache License, Version 
2.0) Apache Commons BeanUtils (commons-beanutils:commons-beanutils:1.7.0 - 
https://commons.apache.org/proper/commons-beanutils/)",
+    "commons-pool:commons-pool:1.5.4": "(The Apache Software License, Version 
2.0) Commons Pool (commons-pool:commons-pool:1.5.4 - 
http://commons.apache.org/pool/)",
+    "org.antlr:antlr-runtime:3.4": "(BSD licence) ANTLR 3 Runtime 
(org.antlr:antlr-runtime:3.4 - http://www.antlr.org)",
+    "javax.transaction:jta:1.1": "(CDDL + GPLv2 with classpath exception) Java 
Transaction API (javax.transaction:jta:1.1 - http://java.sun.com/products/jta)",
+    "javax.servlet.jsp:jsp-api:2.1": "(CDDL + GPLv2 with classpath exception) 
Java Servlet API (javax.servlet.jsp:jsp-api:2.1 - 
https://javaee.github.io/javaee-jsp-api)",
+    "javax.servlet:servlet-api:2.5": "(CDDL + GPLv2 with classpath exception) 
Java Servlet API (javax.servlet:servlet-api:2.5 - 
http://servlet-spec.java.net)",
+    "oro:oro:2.0.8": "(Apache License, Version 1.1) ORO (oro:oro:2.0.8 - 
https://mvnrepository.com/artifact/oro/oro)",
+    "org.hyperic:sigar:1.6.5.132": "(Apache License, Version 2.0) Sigar 
(org.hyperic:sigar:1.6.5.132 - https://github.com/hyperic/sigar)"

Review comment:
       @zhongjiajie Correct, however we don’t need worry this too much, because 
new dependencies always have license info, only very old ones haven’t record 
their license info in maven main repo.




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