You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by aa...@apache.org on 2022/07/27 11:06:11 UTC

[rocketmq-clients] branch master updated: Fix license checker issue (#76)

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

aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git


The following commit(s) were added to refs/heads/master by this push:
     new 1a0c24e  Fix license checker issue (#76)
1a0c24e is described below

commit 1a0c24e39d4f115090972fc85e060a94bd4976c5
Author: yukon <xi...@alibaba-inc.com>
AuthorDate: Wed Jul 27 19:06:07 2022 +0800

    Fix license checker issue (#76)
    
    * Fix license checker issue
    
    * Ignore .bazel from .licenserc.yaml
---
 .licenserc.yaml                                    | 18 ++++++++
 cpp/source/base/tests/AssignmentTest.cpp           | 17 +++++++
 cpp/source/base/tests/MessageQueueTest.cpp         | 17 +++++++
 .../client/include/InsecureCertificateVerifier.h   | 16 +++++++
 cpp/source/rocketmq/tests/SendContextTest.cpp      | 16 +++++++
 cpp/tools/coverage.sh                              | 16 +++++++
 cpp/tools/fix_copyright.py                         | 16 +++++++
 cpp/tools/format.sh                                | 16 +++++++
 cpp/tools/trouble_shooting.sh                      | 15 +++++++
 cpp/tools/use_clang.sh                             | 15 +++++++
 csharp/examples/Program.cs                         | 28 +++++++++---
 csharp/rocketmq-client-csharp/MqLogManager.cs      | 16 +++++++
 .../rocketmq-client-csharp.nlog                    | 14 ++++++
 csharp/tests/MqLogManagerTest.cs                   | 16 +++++++
 csharp/tests/UnitTest1.cs                          | 52 ++++++++++++++--------
 golang/client_manager.go                           | 17 +++++++
 golang/protocol/v2/admin_grpc.pb.go                | 16 +++++++
 golang/protocol/v2/service_grpc.pb.go              | 16 +++++++
 golang/publishing_loadBalancer.go                  | 17 +++++++
 golang/publishing_message.go                       | 17 +++++++
 golang/utils/utils.go                              | 17 +++++++
 java/client-apis/pom.xml                           | 15 +++++++
 java/client-shade/pom.xml                          | 15 +++++++
 .../src/main/resources/rocketmq.logback.xml        | 15 +++++++
 java/client/pom.xml                                | 15 +++++++
 java/client/src/main/resources/logback.xml         | 15 +++++++
 java/pom.xml                                       | 15 +++++++
 java/style/spotbugs-suppressions.xml               | 16 ++++++-
 28 files changed, 469 insertions(+), 25 deletions(-)

diff --git a/.licenserc.yaml b/.licenserc.yaml
index 6546cb1..ad8ecbf 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -27,5 +27,23 @@ header:
     - '**/*.md'
     - 'LICENSE'
     - 'NOTICE'
+    - '**/*.BUILD'
+    - '**/*.bzl'
+    - '**/*.bazel'
+    - '.github/**'
+    - '.gitignore'
+    - 'golang/go.mod'
+    - 'golang/go.sum'
+    - 'java/client/src/main/resources/META-INF/services/org.apache.rocketmq.client.apis.ClientServiceProvider'
+    - 'java/client/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker'
+    - '**/*.csproj'
+    - '**/*.sln'
+    - 'csharp/rocketmq-client-csharp/Protos/google/rpc/**'
+    - 'cpp/.bazelrc'
+    - 'cpp/.bazelversion'
+    - 'cpp/.clang-format'
+    - 'cpp/.clang-tidy'
+    - 'cpp/WORKSPACE'
+    - 'cpp/.gitignore'
 
   comment: on-failure
diff --git a/cpp/source/base/tests/AssignmentTest.cpp b/cpp/source/base/tests/AssignmentTest.cpp
index 88c3c5a..118e12e 100644
--- a/cpp/source/base/tests/AssignmentTest.cpp
+++ b/cpp/source/base/tests/AssignmentTest.cpp
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+ 
 #include "gtest/gtest.h"
 #include <algorithm>
 
diff --git a/cpp/source/base/tests/MessageQueueTest.cpp b/cpp/source/base/tests/MessageQueueTest.cpp
index 2db2c83..805934e 100644
--- a/cpp/source/base/tests/MessageQueueTest.cpp
+++ b/cpp/source/base/tests/MessageQueueTest.cpp
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+ 
 #include <apache/rocketmq/v2/definition.pb.h>
 #include <cstdint>
 
diff --git a/cpp/source/client/include/InsecureCertificateVerifier.h b/cpp/source/client/include/InsecureCertificateVerifier.h
index a673ddd..a2e9262 100644
--- a/cpp/source/client/include/InsecureCertificateVerifier.h
+++ b/cpp/source/client/include/InsecureCertificateVerifier.h
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
 #include "grpcpp/security/tls_certificate_verifier.h"
 #include "rocketmq/RocketMQ.h"
 
diff --git a/cpp/source/rocketmq/tests/SendContextTest.cpp b/cpp/source/rocketmq/tests/SendContextTest.cpp
index 3c29c2c..e03c8b7 100644
--- a/cpp/source/rocketmq/tests/SendContextTest.cpp
+++ b/cpp/source/rocketmq/tests/SendContextTest.cpp
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
 #include <memory>
 
 #include "SendContext.h"
diff --git a/cpp/tools/coverage.sh b/cpp/tools/coverage.sh
index 423bfef..de0ff0d 100755
--- a/cpp/tools/coverage.sh
+++ b/cpp/tools/coverage.sh
@@ -1,4 +1,20 @@
 #!/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.
+
 TOOLS_DIR=$(dirname "$0")
 WORKSPACE_DIR=$(dirname "$TOOLS_DIR")
 cd $WORKSPACE_DIR
diff --git a/cpp/tools/fix_copyright.py b/cpp/tools/fix_copyright.py
index 24bb8f5..22aaac5 100755
--- a/cpp/tools/fix_copyright.py
+++ b/cpp/tools/fix_copyright.py
@@ -1,4 +1,20 @@
 #!/usr/bin/python
+
+# 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 os
 import fnmatch
 
diff --git a/cpp/tools/format.sh b/cpp/tools/format.sh
index 21d9956..3fd6cca 100755
--- a/cpp/tools/format.sh
+++ b/cpp/tools/format.sh
@@ -1,4 +1,20 @@
 #!/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.
+
 TOOLS_DIR=$(dirname "$0")
 WORKSPACE_DIR=$(dirname "$TOOLS_DIR")
 cd $WORKSPACE_DIR
diff --git a/cpp/tools/trouble_shooting.sh b/cpp/tools/trouble_shooting.sh
index 738bd6b..06d3795 100644
--- a/cpp/tools/trouble_shooting.sh
+++ b/cpp/tools/trouble_shooting.sh
@@ -1,2 +1,17 @@
+# 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.
+
 export GRPC_VERBOSITY=debug 
 export GRPC_TRACE=tcp,http,api
\ No newline at end of file
diff --git a/cpp/tools/use_clang.sh b/cpp/tools/use_clang.sh
index 7725259..17f90ef 100755
--- a/cpp/tools/use_clang.sh
+++ b/cpp/tools/use_clang.sh
@@ -1,2 +1,17 @@
+# 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.
+
 export CC=/usr/bin/clang
 export CXX=/usr/bin/clang++
\ No newline at end of file
diff --git a/csharp/examples/Program.cs b/csharp/examples/Program.cs
index 09a1674..4a5ef3f 100644
--- a/csharp/examples/Program.cs
+++ b/csharp/examples/Program.cs
@@ -1,27 +1,43 @@
-using System;
+/*
+ * 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.
+ */
+using System;
 using System.Threading.Tasks;
 using System.Threading;
 
 namespace examples
 {
 
-    class Foo
+    class Foo
     {
         public int bar = 1;
     }
     class Program
     {
 
-        static void RT(Action action, int seconds, CancellationToken token)
+        static void RT(Action action, int seconds, CancellationToken token)
         {
-            if (null == action)
+            if (null == action)
             {
                 return;
             }
 
             Task.Run(async () =>
             {
-                while (!token.IsCancellationRequested)
+                while (!token.IsCancellationRequested)
                 {
                     action();
                     await Task.Delay(TimeSpan.FromSeconds(seconds), token);
@@ -48,7 +64,7 @@ namespace examples
             ThreadPool.QueueUserWorkItem((Object stateInfo) =>
             {
                 Console.WriteLine("From ThreadPool");
-                if (stateInfo is Foo)
+                if (stateInfo is Foo)
                 {
                     Console.WriteLine("Foo: bar=" + (stateInfo as Foo).bar);
                 }
diff --git a/csharp/rocketmq-client-csharp/MqLogManager.cs b/csharp/rocketmq-client-csharp/MqLogManager.cs
index 3d294bd..dcbdce5 100644
--- a/csharp/rocketmq-client-csharp/MqLogManager.cs
+++ b/csharp/rocketmq-client-csharp/MqLogManager.cs
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
 using System;
 using System.IO;
 using System.Reflection;
diff --git a/csharp/rocketmq-client-csharp/rocketmq-client-csharp.nlog b/csharp/rocketmq-client-csharp/rocketmq-client-csharp.nlog
index b10da72..896b9c8 100644
--- a/csharp/rocketmq-client-csharp/rocketmq-client-csharp.nlog
+++ b/csharp/rocketmq-client-csharp/rocketmq-client-csharp.nlog
@@ -1,4 +1,18 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+  -->
 
 <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/csharp/tests/MqLogManagerTest.cs b/csharp/tests/MqLogManagerTest.cs
index 4d163b2..8a0e2c2 100644
--- a/csharp/tests/MqLogManagerTest.cs
+++ b/csharp/tests/MqLogManagerTest.cs
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
 using System;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 using NLog;
diff --git a/csharp/tests/UnitTest1.cs b/csharp/tests/UnitTest1.cs
index bbf537a..2706c54 100644
--- a/csharp/tests/UnitTest1.cs
+++ b/csharp/tests/UnitTest1.cs
@@ -1,3 +1,19 @@
+/*
+ * 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.
+ */
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 using Org.Apache.Rocketmq;
 using Grpc.Net.Client;
@@ -16,37 +32,37 @@ namespace tests
         public void TestMethod1()
         {
             rmq::Permission perm = rmq::Permission.None;
-            switch (perm)
+            switch (perm)
             {
-                case rmq::Permission.None:
-                    {
-                        Console.WriteLine("None");
-                        break;
+                case rmq::Permission.None:
+                    {
+                        Console.WriteLine("None");
+                        break;
                     }
 
-                case rmq::Permission.Read:
-                    {
-                        Console.WriteLine("Read");
-                        break;
+                case rmq::Permission.Read:
+                    {
+                        Console.WriteLine("Read");
+                        break;
                     }
 
-                case rmq::Permission.Write:
-                    {
-                        Console.WriteLine("Write");
-                        break;
+                case rmq::Permission.Write:
+                    {
+                        Console.WriteLine("Write");
+                        break;
                     }
 
-                case rmq::Permission.ReadWrite:
-                    {
-                        Console.WriteLine("ReadWrite");
-                        break;
+                case rmq::Permission.ReadWrite:
+                    {
+                        Console.WriteLine("ReadWrite");
+                        break;
                     }
 
             }
         }
 
         [TestMethod]
-        public void TestRpcClientImplCtor()
+        public void TestRpcClientImplCtor()
         {
             RpcClient impl = new RpcClient("https://localhost:5001");
         }
diff --git a/golang/client_manager.go b/golang/client_manager.go
index b35686a..db02e32 100644
--- a/golang/client_manager.go
+++ b/golang/client_manager.go
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
 package golang
 
 import (
diff --git a/golang/protocol/v2/admin_grpc.pb.go b/golang/protocol/v2/admin_grpc.pb.go
index 0bcb0c2..8fba122 100644
--- a/golang/protocol/v2/admin_grpc.pb.go
+++ b/golang/protocol/v2/admin_grpc.pb.go
@@ -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.
+
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.2.0
@@ -8,6 +23,7 @@ package v2
 
 import (
 	context "context"
+
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
diff --git a/golang/protocol/v2/service_grpc.pb.go b/golang/protocol/v2/service_grpc.pb.go
index 2b336a9..ae4318c 100644
--- a/golang/protocol/v2/service_grpc.pb.go
+++ b/golang/protocol/v2/service_grpc.pb.go
@@ -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.
+
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.2.0
@@ -8,6 +23,7 @@ package v2
 
 import (
 	context "context"
+
 	grpc "google.golang.org/grpc"
 	codes "google.golang.org/grpc/codes"
 	status "google.golang.org/grpc/status"
diff --git a/golang/publishing_loadBalancer.go b/golang/publishing_loadBalancer.go
index 40befce..aaed5f4 100644
--- a/golang/publishing_loadBalancer.go
+++ b/golang/publishing_loadBalancer.go
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
 package golang
 
 import (
diff --git a/golang/publishing_message.go b/golang/publishing_message.go
index 22c3f71..fcd0002 100644
--- a/golang/publishing_message.go
+++ b/golang/publishing_message.go
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
 package golang
 
 import (
diff --git a/golang/utils/utils.go b/golang/utils/utils.go
index bb941d4..c5229e0 100644
--- a/golang/utils/utils.go
+++ b/golang/utils/utils.go
@@ -1,3 +1,20 @@
+/*
+ * 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.
+ */
+
 package utils
 
 func Abs(n int32) int32 {
diff --git a/java/client-apis/pom.xml b/java/client-apis/pom.xml
index 8385c4d..7adf5dc 100644
--- a/java/client-apis/pom.xml
+++ b/java/client-apis/pom.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  -->
+  
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/java/client-shade/pom.xml b/java/client-shade/pom.xml
index e945103..defa0f6 100644
--- a/java/client-shade/pom.xml
+++ b/java/client-shade/pom.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  -->
+  
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/java/client-shade/src/main/resources/rocketmq.logback.xml b/java/client-shade/src/main/resources/rocketmq.logback.xml
index 344b29f..ff398f3 100644
--- a/java/client-shade/src/main/resources/rocketmq.logback.xml
+++ b/java/client-shade/src/main/resources/rocketmq.logback.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  -->
+  
 <configuration debug="false">
     <conversionRule conversionWord="pid" converterClass="org.apache.rocketmq.client.java.logging.ProcessIdConverter"/>
     <appender name="CustomConsoleAppender" class="org.apache.rocketmq.client.java.logging.CustomConsoleAppender">
diff --git a/java/client/pom.xml b/java/client/pom.xml
index c488844..734ad0b 100644
--- a/java/client/pom.xml
+++ b/java/client/pom.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  -->
+  
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/java/client/src/main/resources/logback.xml b/java/client/src/main/resources/logback.xml
index 5e5aabe..62d40db 100644
--- a/java/client/src/main/resources/logback.xml
+++ b/java/client/src/main/resources/logback.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  -->
+  
 <configuration debug="false">
     <conversionRule conversionWord="pid" converterClass="org.apache.rocketmq.client.java.logging.ProcessIdConverter"/>
     <appender name="CustomConsoleAppender" class="org.apache.rocketmq.client.java.logging.CustomConsoleAppender">
diff --git a/java/pom.xml b/java/pom.xml
index e6c612f..1f4aefb 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -1,4 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+  -->
+  
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
diff --git a/java/style/spotbugs-suppressions.xml b/java/style/spotbugs-suppressions.xml
index eb0bb8d..4e28e14 100644
--- a/java/style/spotbugs-suppressions.xml
+++ b/java/style/spotbugs-suppressions.xml
@@ -1,5 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
+<!--
+  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.
+  -->
+  
 <FindBugsFilter>
     <Match>
         <Bug pattern="SF_SWITCH_FALLTHROUGH,SIC_INNER_SHOULD_BE_STATIC_ANON,URF_UNREAD_FIELD,UUF_UNUSED_FIELD,SS_SHOULD_BE_STATIC,NM_CONFUSING"/>