You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/08/06 11:19:42 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #3221: Add dependency licenses check and add missing license and NOTICE

wu-sheng commented on a change in pull request #3221: Add dependency licenses check and add missing license and NOTICE
URL: https://github.com/apache/skywalking/pull/3221#discussion_r311009632
 
 

 ##########
 File path: tools/dependencies/check-LICENSE.sh
 ##########
 @@ -0,0 +1,32 @@
+#!/usr/bin/env 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.
+#
+
+# List all modules(jars) that belong to the SkyWalking itself, these will be ignored
+# when checking the dependency licenses
+./mvnw -Pbackend -Dexec.executable='echo' -Dexec.args='${project.artifactId}-${project.version}.jar' exec:exec -q > self-modules.txt
+
+ls dist/apache-skywalking-apm-bin/oap-libs > all-dependencies.txt
+
+# Exclude all self modules(jars) to generate all third-party dependencies
+grep -vf self-modules.txt all-dependencies.txt > third-party-dependencies.txt
+
+# Compare the third-party dependencies with known dependencies, expect that
+# all third-party dependencies are KNOWN and the exit code of the command is 0,
+# otherwise we should add its license to LICENSE file and add the dependency to known-dependencies.txt
+diff -U0 tools/dependencies/known-dependencies.txt third-party-dependencies.txt
 
 Review comment:
   You need to consider order. Maybe different in different OS.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services