chore(license): check and fix *.txt files license (#1173)

diff --git a/.github/workflows/standardization_lint.yaml b/.github/workflows/standardization_lint.yaml
index 481c653..75f3944 100644
--- a/.github/workflows/standardization_lint.yaml
+++ b/.github/workflows/standardization_lint.yaml
@@ -78,7 +78,7 @@
       - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
         uses: actions/checkout@v2
       - name: Check License Header
-        uses: apache/skywalking-eyes@v0.3.0
+        uses: apache/skywalking-eyes@main
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # needed only when you want License-Eye to comment on the pull request.
         with:
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 829c957..0ea80e8 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -47,16 +47,17 @@
     - 'src/rdsn/src/utils/test/TokenBucketTest.cpp'
     - 'src/rdsn/src/utils/test/TokenBucketTest.h'
     # https://github.com/preshing/cpp11-on-multicore/blob/master/LICENSE
-    - 'src/rdsn/include/dsn/utility/hpc_locks/autoreseteventcondvar.h'
-    - 'src/rdsn/include/dsn/utility/hpc_locks/rwlock.h'
     - 'src/rdsn/include/dsn/utility/hpc_locks/autoresetevent.h'
-    - 'src/rdsn/include/dsn/utility/hpc_locks/sema.h'
-    - 'src/rdsn/include/dsn/utility/hpc_locks/bitfield.h'
+    - 'src/rdsn/include/dsn/utility/hpc_locks/autoreseteventcondvar.h'
     - 'src/rdsn/include/dsn/utility/hpc_locks/benaphore.h'
+    - 'src/rdsn/include/dsn/utility/hpc_locks/bitfield.h'
+    - 'src/rdsn/include/dsn/utility/hpc_locks/readme.txt'
+    - 'src/rdsn/include/dsn/utility/hpc_locks/rwlock.h'
+    - 'src/rdsn/include/dsn/utility/hpc_locks/sema.h'
     # Copyright (c) xxxx The Chromium Authors
+    - 'src/rdsn/include/dsn/utility/safe_strerror_posix.h'
     - 'src/rdsn/src/runtime/build_config.h'
     - 'src/rdsn/src/utils/test/autoref_ptr_test.cpp'
-    - 'src/rdsn/include/dsn/utility/safe_strerror_posix.h'
     - 'src/rdsn/src/utils/safe_strerror_posix.cpp'
     # Copyright 2017 The Abseil Authors
     - 'src/rdsn/include/dsn/utility/absl/base/internal/invoke.h'
@@ -202,6 +203,7 @@
     - 'src/rdsn/include/dsn/utility/utils.h'
     - 'src/rdsn/include/dsn/utility/work_queue.h'
     - 'src/rdsn/include/dsn/utils/time_utils.h'
+    - 'src/rdsn/src/aio/CMakeLists.txt'
     - 'src/rdsn/src/aio/aio_provider.cpp'
     - 'src/rdsn/src/aio/aio_provider.h'
     - 'src/rdsn/src/aio/disk_engine.cpp'
@@ -209,17 +211,21 @@
     - 'src/rdsn/src/aio/file_io.cpp'
     - 'src/rdsn/src/aio/native_linux_aio_provider.cpp'
     - 'src/rdsn/src/aio/native_linux_aio_provider.h'
+    - 'src/rdsn/src/aio/test/CMakeLists.txt'
     - 'src/rdsn/src/aio/test/aio.cpp'
     - 'src/rdsn/src/aio/test/clear.sh'
     - 'src/rdsn/src/aio/test/config.ini'
+    - 'src/rdsn/src/aio/test/copy_source.txt'
     - 'src/rdsn/src/aio/test/run.sh'
     - 'src/rdsn/src/block_service/test/config-test.ini'
+    - 'src/rdsn/src/client/CMakeLists.txt'
     - 'src/rdsn/src/client/partition_resolver.cpp'
     - 'src/rdsn/src/client/partition_resolver_manager.cpp'
     - 'src/rdsn/src/client/partition_resolver_manager.h'
     - 'src/rdsn/src/client/partition_resolver_simple.cpp'
     - 'src/rdsn/src/client/partition_resolver_simple.h'
     - 'src/rdsn/src/client/replication_ddl_client.cpp'
+    - 'src/rdsn/src/common/CMakeLists.txt'
     - 'src/rdsn/src/common/consensus.thrift'
     - 'src/rdsn/src/common/fs_manager.cpp'
     - 'src/rdsn/src/common/meta_admin.thrift'
@@ -227,13 +233,16 @@
     - 'src/rdsn/src/common/replica_admin.thrift'
     - 'src/rdsn/src/common/replication_common.cpp'
     - 'src/rdsn/src/common/replication_common.h'
+    - 'src/rdsn/src/common/test/CMakeLists.txt'
     - 'src/rdsn/src/common/test/config-test.ini'
     - 'src/rdsn/src/common/test/duplication_common_test.cpp'
     - 'src/rdsn/src/common/test/main.cpp'
     - 'src/rdsn/src/common/test/run.sh'
+    - 'src/rdsn/src/failure_detector/CMakeLists.txt'
     - 'src/rdsn/src/failure_detector/failure_detector.cpp'
     - 'src/rdsn/src/failure_detector/failure_detector_multimaster.cpp'
     - 'src/rdsn/src/failure_detector/fd.thrift'
+    - 'src/rdsn/src/failure_detector/test/CMakeLists.txt'
     - 'src/rdsn/src/failure_detector/test/clear.sh'
     - 'src/rdsn/src/failure_detector/test/config-test.ini'
     - 'src/rdsn/src/failure_detector/test/config-whitelist-test-failed.ini'
@@ -244,6 +253,7 @@
     - 'src/rdsn/src/http/http_message_parser.cpp'
     - 'src/rdsn/src/http/http_message_parser.h'
     - 'src/rdsn/src/http/test/run.sh'
+    - 'src/rdsn/src/meta/CMakeLists.txt'
     - 'src/rdsn/src/meta/distributed_lock_service_simple.cpp'
     - 'src/rdsn/src/meta/distributed_lock_service_simple.h'
     - 'src/rdsn/src/meta/dump_file.h'
@@ -266,6 +276,8 @@
     - 'src/rdsn/src/meta/server_load_balancer.h'
     - 'src/rdsn/src/meta/server_state.cpp'
     - 'src/rdsn/src/meta/server_state.h'
+    - 'src/rdsn/src/meta/test/CMakeLists.txt'
+    - 'src/rdsn/src/meta/test/balancer_simulator/CMakeLists.txt'
     - 'src/rdsn/src/meta/test/balancer_simulator/balancer_simulator.cpp'
     - 'src/rdsn/src/meta/test/balancer_validator.cpp'
     - 'src/rdsn/src/meta/test/clear.sh'
@@ -279,7 +291,7 @@
     - 'src/rdsn/src/meta/test/meta_partition_guardian_test.cpp'
     - 'src/rdsn/src/meta/test/meta_service_test_app.h'
     - 'src/rdsn/src/meta/test/meta_split_service_test.cpp'
-    - 'src/rdsn/src/meta/test/meta_state/clear.cmd'
+    - 'src/rdsn/src/meta/test/meta_state/CMakeLists.txt'
     - 'src/rdsn/src/meta/test/meta_state/clear.sh'
     - 'src/rdsn/src/meta/test/meta_state/config-test.ini'
     - 'src/rdsn/src/meta/test/meta_state/main.cpp'
@@ -292,6 +304,7 @@
     - 'src/rdsn/src/meta/test/server_state_test.cpp'
     - 'src/rdsn/src/meta/test/state_sync_test.cpp'
     - 'src/rdsn/src/meta/test/update_configuration_test.cpp'
+    - 'src/rdsn/src/nfs/CMakeLists.txt'
     - 'src/rdsn/src/nfs/nfs.thrift'
     - 'src/rdsn/src/nfs/nfs_client_impl.cpp'
     - 'src/rdsn/src/nfs/nfs_client_impl.h'
@@ -301,17 +314,22 @@
     - 'src/rdsn/src/nfs/nfs_node_simple.h'
     - 'src/rdsn/src/nfs/nfs_server_impl.cpp'
     - 'src/rdsn/src/nfs/nfs_server_impl.h'
+    - 'src/rdsn/src/nfs/test/CMakeLists.txt'
     - 'src/rdsn/src/nfs/test/clear.sh'
     - 'src/rdsn/src/nfs/test/config.ini'
     - 'src/rdsn/src/nfs/test/main.cpp'
     - 'src/rdsn/src/nfs/test/run.sh'
+    - 'src/rdsn/src/perf_counter/CMakeLists.txt'
     - 'src/rdsn/src/perf_counter/perf_counter.cpp'
     - 'src/rdsn/src/perf_counter/perf_counters.cpp'
+    - 'src/rdsn/src/perf_counter/test/CMakeLists.txt'
     - 'src/rdsn/src/perf_counter/test/clear.sh'
     - 'src/rdsn/src/perf_counter/test/perf_counter_test.cpp'
     - 'src/rdsn/src/perf_counter/test/perf_counters_test.cpp'
     - 'src/rdsn/src/perf_counter/test/run.sh'
+    - 'src/rdsn/src/remote_cmd/CMakeLists.txt'
     - 'src/rdsn/src/remote_cmd/command.thrift'
+    - 'src/rdsn/src/replica/CMakeLists.txt'
     - 'src/rdsn/src/replica/backup/test/config-test.ini'
     - 'src/rdsn/src/replica/backup/test/run.sh'
     - 'src/rdsn/src/replica/bulk_load/test/config-test.ini'
@@ -349,6 +367,8 @@
     - 'src/rdsn/src/replica/replication_service_app.cpp'
     - 'src/rdsn/src/replica/split/test/config-test.ini'
     - 'src/rdsn/src/replica/split/test/run.sh'
+    - 'src/rdsn/src/replica/storage/CMakeLists.txt'
+    - 'src/rdsn/src/replica/storage/simple_kv/CMakeLists.txt'
     - 'src/rdsn/src/replica/storage/simple_kv/clear.sh'
     - 'src/rdsn/src/replica/storage/simple_kv/config.ini'
     - 'src/rdsn/src/replica/storage/simple_kv/run.sh'
@@ -360,6 +380,7 @@
     - 'src/rdsn/src/replica/storage/simple_kv/simple_kv.server.impl.cpp'
     - 'src/rdsn/src/replica/storage/simple_kv/simple_kv.server.impl.h'
     - 'src/rdsn/src/replica/storage/simple_kv/simple_kv.thrift'
+    - 'src/rdsn/src/replica/storage/simple_kv/test/CMakeLists.txt'
     - 'src/rdsn/src/replica/storage/simple_kv/test/README.md'
     - 'src/rdsn/src/replica/storage/simple_kv/test/addcase.sh'
     - 'src/rdsn/src/replica/storage/simple_kv/test/case-000.act'
@@ -482,6 +503,7 @@
     - 'src/rdsn/src/replica/storage/simple_kv/test/simple_kv.main.cpp'
     - 'src/rdsn/src/replica/storage/simple_kv/test/simple_kv.server.impl.cpp'
     - 'src/rdsn/src/replica/storage/simple_kv/test/simple_kv.server.impl.h'
+    - 'src/rdsn/src/replica/test/CMakeLists.txt'
     - 'src/rdsn/src/replica/test/config-test.ini'
     - 'src/rdsn/src/replica/test/mock_utils.h'
     - 'src/rdsn/src/replica/test/mutation_log_learn_test.cpp'
@@ -489,6 +511,7 @@
     - 'src/rdsn/src/replica/test/replica_test_base.h'
     - 'src/rdsn/src/replica/test/replication_service_test_app.h'
     - 'src/rdsn/src/replica/test/run.sh'
+    - 'src/rdsn/src/runtime/CMakeLists.txt'
     - 'src/rdsn/src/runtime/core_main.cpp'
     - 'src/rdsn/src/runtime/dsn.layer2_types.cpp'
     - 'src/rdsn/src/runtime/env.sim.cpp'
@@ -500,6 +523,7 @@
     - 'src/rdsn/src/runtime/profiler.cpp'
     - 'src/rdsn/src/runtime/profiler_header.h'
     - 'src/rdsn/src/runtime/providers.common.cpp'
+    - 'src/rdsn/src/runtime/rpc/CMakeLists.txt'
     - 'src/rdsn/src/runtime/rpc/asio_net_provider.cpp'
     - 'src/rdsn/src/runtime/rpc/asio_net_provider.h'
     - 'src/rdsn/src/runtime/rpc/asio_rpc_session.cpp'
@@ -525,6 +549,7 @@
     - 'src/rdsn/src/runtime/service_engine.cpp'
     - 'src/rdsn/src/runtime/service_engine.h'
     - 'src/rdsn/src/runtime/simulator.cpp'
+    - 'src/rdsn/src/runtime/task/CMakeLists.txt'
     - 'src/rdsn/src/runtime/task/hpc_task_queue.cpp'
     - 'src/rdsn/src/runtime/task/hpc_task_queue.h'
     - 'src/rdsn/src/runtime/task/simple_task_queue.cpp'
@@ -539,8 +564,10 @@
     - 'src/rdsn/src/runtime/task/task_spec.cpp'
     - 'src/rdsn/src/runtime/task/task_tracker.cpp'
     - 'src/rdsn/src/runtime/task/task_worker.cpp'
+    - 'src/rdsn/src/runtime/test/CMakeLists.txt'
     - 'src/rdsn/src/runtime/test/async_call.cpp'
     - 'src/rdsn/src/runtime/test/clear.sh'
+    - 'src/rdsn/src/runtime/test/command.txt'
     - 'src/rdsn/src/runtime/test/config-test-corrupt-message.ini'
     - 'src/rdsn/src/runtime/test/config-test-sim.ini'
     - 'src/rdsn/src/runtime/test/config-test.ini'
@@ -562,7 +589,9 @@
     - 'src/rdsn/src/runtime/tool_api.cpp'
     - 'src/rdsn/src/runtime/tracer.cpp'
     - 'src/rdsn/src/runtime/zlocks.cpp'
+    - 'src/rdsn/src/tools/CMakeLists.txt'
     - 'src/rdsn/src/tools/mutation_log_tool.cpp'
+    - 'src/rdsn/src/utils/CMakeLists.txt'
     - 'src/rdsn/src/utils/binary_reader.cpp'
     - 'src/rdsn/src/utils/binary_writer.cpp'
     - 'src/rdsn/src/utils/command_manager.cpp'
@@ -581,6 +610,7 @@
     - 'src/rdsn/src/utils/simple_logger.cpp'
     - 'src/rdsn/src/utils/simple_logger.h'
     - 'src/rdsn/src/utils/strings.cpp'
+    - 'src/rdsn/src/utils/test/CMakeLists.txt'
     - 'src/rdsn/src/utils/test/address.cpp'
     - 'src/rdsn/src/utils/test/clear.sh'
     - 'src/rdsn/src/utils/test/command_manager.cpp'
@@ -611,11 +641,13 @@
     - 'src/rdsn/src/utils/thread_access_checker.cpp'
     - 'src/rdsn/src/utils/utils.cpp'
     - 'src/rdsn/src/utils/zlock_provider.h'
+    - 'src/rdsn/src/zookeeper/CMakeLists.txt'
     - 'src/rdsn/src/zookeeper/distributed_lock_service_zookeeper.cpp'
     - 'src/rdsn/src/zookeeper/distributed_lock_service_zookeeper.h'
     - 'src/rdsn/src/zookeeper/lock_struct.cpp'
     - 'src/rdsn/src/zookeeper/lock_struct.h'
     - 'src/rdsn/src/zookeeper/lock_types.h'
+    - 'src/rdsn/src/zookeeper/test/CMakeLists.txt'
     - 'src/rdsn/src/zookeeper/test/clear.sh'
     - 'src/rdsn/src/zookeeper/test/config-test.ini'
     - 'src/rdsn/src/zookeeper/test/distributed_lock_zookeeper.cpp'
diff --git a/docker/README.md b/docker/README.md
index eb75af3..1021504 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -27,7 +27,7 @@
 
 [![BuildThirdpartyDockerRegularly - build and publish thirdparty every week](https://github.com/apache/incubator-pegasus/actions/workflows/thirdparty-regular-push.yml/badge.svg)](https://github.com/apache/incubator-pegasus/actions/workflows/thirdparty-regular-push.yml)
 
-[![BuildPegasusRegularly - build pegasus and rdsn on different env every day](https://github.com/apache/incubator-pegasus/actions/workflows/pegasus-regular-build.yml/badge.svg)](https://github.com/apache/incubator-pegasus/actions/workflows/pegasus-regular-build.yml)
+[![Lint and build regularly](https://github.com/apache/incubator-pegasus/actions/workflows/regular-build.yml/badge.svg)](https://github.com/apache/incubator-pegasus/actions/workflows/regular-build.yml)
 
 ## pegasus-build-env
 
diff --git a/src/rdsn/src/aio/CMakeLists.txt b/src/rdsn/src/aio/CMakeLists.txt
index e22e538..45d24cf 100644
--- a/src/rdsn/src/aio/CMakeLists.txt
+++ b/src/rdsn/src/aio/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_aio)
 
 #Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/aio/test/CMakeLists.txt b/src/rdsn/src/aio/test/CMakeLists.txt
index 85cc6d7..4228a01 100644
--- a/src/rdsn/src/aio/test/CMakeLists.txt
+++ b/src/rdsn/src/aio/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_aio_test)
 
 # Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/block_service/fds/CMakeLists.txt b/src/rdsn/src/block_service/fds/CMakeLists.txt
index d453f72..6058605 100644
--- a/src/rdsn/src/block_service/fds/CMakeLists.txt
+++ b/src/rdsn/src/block_service/fds/CMakeLists.txt
@@ -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.
+
 set(MY_PROJ_NAME dsn.block_service.fds)
 
 #Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/block_service/hdfs/CMakeLists.txt b/src/rdsn/src/block_service/hdfs/CMakeLists.txt
index 324c204..803e85b 100644
--- a/src/rdsn/src/block_service/hdfs/CMakeLists.txt
+++ b/src/rdsn/src/block_service/hdfs/CMakeLists.txt
@@ -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.
+
 set(MY_PROJ_NAME dsn.block_service.hdfs)
 
 set(DIRECTIO_SRC
diff --git a/src/rdsn/src/block_service/local/CMakeLists.txt b/src/rdsn/src/block_service/local/CMakeLists.txt
index d7348c2..0886bec 100644
--- a/src/rdsn/src/block_service/local/CMakeLists.txt
+++ b/src/rdsn/src/block_service/local/CMakeLists.txt
@@ -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.
+
 set(MY_PROJ_NAME dsn.block_service.local)
 
 #Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/client/CMakeLists.txt b/src/rdsn/src/client/CMakeLists.txt
index b394f05..3951a09 100644
--- a/src/rdsn/src/client/CMakeLists.txt
+++ b/src/rdsn/src/client/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_client)
 
 # Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/common/CMakeLists.txt b/src/rdsn/src/common/CMakeLists.txt
index 58bc889..8ff690b 100644
--- a/src/rdsn/src/common/CMakeLists.txt
+++ b/src/rdsn/src/common/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_replication_common)
 
 thrift_generate_cpp(
diff --git a/src/rdsn/src/common/test/CMakeLists.txt b/src/rdsn/src/common/test/CMakeLists.txt
index aaeba3e..78d9400 100644
--- a/src/rdsn/src/common/test/CMakeLists.txt
+++ b/src/rdsn/src/common/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_replication_common_test)
 
 set(MY_SRC_SEARCH_MODE "GLOB")
diff --git a/src/rdsn/src/failure_detector/CMakeLists.txt b/src/rdsn/src/failure_detector/CMakeLists.txt
index 801d1ac..cbeb139 100644
--- a/src/rdsn/src/failure_detector/CMakeLists.txt
+++ b/src/rdsn/src/failure_detector/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.failure_detector)
 
 thrift_generate_cpp(
diff --git a/src/rdsn/src/failure_detector/test/CMakeLists.txt b/src/rdsn/src/failure_detector/test/CMakeLists.txt
index d739a5c..4bc1254 100644
--- a/src/rdsn/src/failure_detector/test/CMakeLists.txt
+++ b/src/rdsn/src/failure_detector/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.failure_detector.tests)
 
 # Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/http/CMakeLists.txt b/src/rdsn/src/http/CMakeLists.txt
index 5e6aac1..44f9379 100644
--- a/src/rdsn/src/http/CMakeLists.txt
+++ b/src/rdsn/src/http/CMakeLists.txt
@@ -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
@@ -15,7 +14,6 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-##############################################################################
 
 set(MY_PROJ_NAME dsn_http)
 
diff --git a/src/rdsn/src/http/test/CMakeLists.txt b/src/rdsn/src/http/test/CMakeLists.txt
index 128fbc0..6a09e42 100644
--- a/src/rdsn/src/http/test/CMakeLists.txt
+++ b/src/rdsn/src/http/test/CMakeLists.txt
@@ -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.
+
 set(MY_PROJ_NAME dsn_http_test)
 
 set(MY_PROJ_SRC "")
diff --git a/src/rdsn/src/meta/CMakeLists.txt b/src/rdsn/src/meta/CMakeLists.txt
index 268bfff..3920e93 100644
--- a/src/rdsn/src/meta/CMakeLists.txt
+++ b/src/rdsn/src/meta/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_meta_server)
 
 set(DUPLICATION_SRC
diff --git a/src/rdsn/src/meta/test/CMakeLists.txt b/src/rdsn/src/meta/test/CMakeLists.txt
index e527868..a460ea8 100644
--- a/src/rdsn/src/meta/test/CMakeLists.txt
+++ b/src/rdsn/src/meta/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.meta.test)
 
 # Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/meta/test/balancer_simulator/CMakeLists.txt b/src/rdsn/src/meta/test/balancer_simulator/CMakeLists.txt
index 534e3e3..6258cb9 100644
--- a/src/rdsn/src/meta/test/balancer_simulator/CMakeLists.txt
+++ b/src/rdsn/src/meta/test/balancer_simulator/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME sim_lb)
 
 # Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/meta/test/meta_state/CMakeLists.txt b/src/rdsn/src/meta/test/meta_state/CMakeLists.txt
index 9fdf351..74c2896 100644
--- a/src/rdsn/src/meta/test/meta_state/CMakeLists.txt
+++ b/src/rdsn/src/meta/test/meta_state/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_meta_state_tests)
 
 # Source files under CURRENT project directory will be automatically included.
@@ -23,7 +47,6 @@
 set(MY_BINPLACES
     "run.sh"
     "clear.sh"
-    "clear.cmd"
     "config-test.ini"
     "gtest.filter"
 )
diff --git a/src/rdsn/src/meta/test/meta_state/clear.cmd b/src/rdsn/src/meta/test/meta_state/clear.cmd
deleted file mode 100644
index b029926..0000000
--- a/src/rdsn/src/meta/test/meta_state/clear.cmd
+++ /dev/null
@@ -1,29 +0,0 @@
-rem The MIT License (MIT)
-rem
-rem Copyright (c) 2015 Microsoft Corporation
-rem
-rem -=- Robust Distributed System Nucleus (rDSN) -=-
-rem
-rem Permission is hereby granted, free of charge, to any person obtaining a copy
-rem of this software and associated documentation files (the "Software"), to deal
-rem in the Software without restriction, including without limitation the rights
-rem to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-rem copies of the Software, and to permit persons to whom the Software is
-rem furnished to do so, subject to the following conditions:
-rem
-rem The above copyright notice and this permission notice shall be included in
-rem all copies or substantial portions of the Software.
-rem
-rem THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-rem IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-rem FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-rem AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-rem LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-rem OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-rem THE SOFTWARE.
-
-@ECHO OFF
-@rmdir /Q /S data
-@rmdir /Q /S nfs_test_dir* 
-DEL /Q *.tmp 
-DEL /Q command.copy.txt
diff --git a/src/rdsn/src/nfs/CMakeLists.txt b/src/rdsn/src/nfs/CMakeLists.txt
index d5025dd..af062b2 100644
--- a/src/rdsn/src/nfs/CMakeLists.txt
+++ b/src/rdsn/src/nfs/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_nfs)
 
 thrift_generate_cpp(
diff --git a/src/rdsn/src/nfs/test/CMakeLists.txt b/src/rdsn/src/nfs/test/CMakeLists.txt
index a899a86..735bb29 100644
--- a/src/rdsn/src/nfs/test/CMakeLists.txt
+++ b/src/rdsn/src/nfs/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_nfs_test)
 
 # Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/perf_counter/CMakeLists.txt b/src/rdsn/src/perf_counter/CMakeLists.txt
index 03a3ecb..6da7129 100644
--- a/src/rdsn/src/perf_counter/CMakeLists.txt
+++ b/src/rdsn/src/perf_counter/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.perf_counter)
 
 set(MY_PROJ_SRC "")
diff --git a/src/rdsn/src/perf_counter/test/CMakeLists.txt b/src/rdsn/src/perf_counter/test/CMakeLists.txt
index d737ac9..a02a692 100644
--- a/src/rdsn/src/perf_counter/test/CMakeLists.txt
+++ b/src/rdsn/src/perf_counter/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_perf_counter_test)
 
 # Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/remote_cmd/CMakeLists.txt b/src/rdsn/src/remote_cmd/CMakeLists.txt
index fbff728..51d0a96 100644
--- a/src/rdsn/src/remote_cmd/CMakeLists.txt
+++ b/src/rdsn/src/remote_cmd/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_dist_cmd)
 
 thrift_generate_cpp(
diff --git a/src/rdsn/src/replica/CMakeLists.txt b/src/rdsn/src/replica/CMakeLists.txt
index c5721fa..fa43652 100644
--- a/src/rdsn/src/replica/CMakeLists.txt
+++ b/src/rdsn/src/replica/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_replica_server)
 
 set(DUPLICATION_SRC
diff --git a/src/rdsn/src/replica/backup/test/CMakeLists.txt b/src/rdsn/src/replica/backup/test/CMakeLists.txt
index eeaa56d..19d240b 100644
--- a/src/rdsn/src/replica/backup/test/CMakeLists.txt
+++ b/src/rdsn/src/replica/backup/test/CMakeLists.txt
@@ -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.
+
 set(MY_PROJ_NAME dsn_replica_backup_test)
 
 set(MY_PROJ_SRC "")
diff --git a/src/rdsn/src/replica/bulk_load/test/CMakeLists.txt b/src/rdsn/src/replica/bulk_load/test/CMakeLists.txt
index 9140a75..debb101 100644
--- a/src/rdsn/src/replica/bulk_load/test/CMakeLists.txt
+++ b/src/rdsn/src/replica/bulk_load/test/CMakeLists.txt
@@ -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.
+
 set(MY_PROJ_NAME dsn_replica_bulk_load_test)
 
 set(MY_PROJ_SRC "")
diff --git a/src/rdsn/src/replica/duplication/test/CMakeLists.txt b/src/rdsn/src/replica/duplication/test/CMakeLists.txt
index 0eb03e9..b02c521 100644
--- a/src/rdsn/src/replica/duplication/test/CMakeLists.txt
+++ b/src/rdsn/src/replica/duplication/test/CMakeLists.txt
@@ -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.
+
 set(MY_PROJ_NAME dsn_replica_dup_test)
 
 set(MY_PROJ_SRC "")
diff --git a/src/rdsn/src/replica/split/test/CMakeLists.txt b/src/rdsn/src/replica/split/test/CMakeLists.txt
index ee7ca68..7012b3f 100644
--- a/src/rdsn/src/replica/split/test/CMakeLists.txt
+++ b/src/rdsn/src/replica/split/test/CMakeLists.txt
@@ -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.
+
 set(MY_PROJ_NAME dsn_replica_split_test)
 
 set(MY_PROJ_SRC "")
diff --git a/src/rdsn/src/replica/storage/CMakeLists.txt b/src/rdsn/src/replica/storage/CMakeLists.txt
index ddbac4f..e140712 100644
--- a/src/rdsn/src/replica/storage/CMakeLists.txt
+++ b/src/rdsn/src/replica/storage/CMakeLists.txt
@@ -1 +1,25 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 add_subdirectory(simple_kv)
diff --git a/src/rdsn/src/replica/storage/simple_kv/CMakeLists.txt b/src/rdsn/src/replica/storage/simple_kv/CMakeLists.txt
index aaf7029..9448615 100644
--- a/src/rdsn/src/replica/storage/simple_kv/CMakeLists.txt
+++ b/src/rdsn/src/replica/storage/simple_kv/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.replication.simple_kv)
 
 thrift_generate_cpp(
diff --git a/src/rdsn/src/replica/storage/simple_kv/test/CMakeLists.txt b/src/rdsn/src/replica/storage/simple_kv/test/CMakeLists.txt
index 17eba92..419b04c 100644
--- a/src/rdsn/src/replica/storage/simple_kv/test/CMakeLists.txt
+++ b/src/rdsn/src/replica/storage/simple_kv/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.rep_tests.simple_kv)
 
 # Search mode for source files under CURRENT project directory?
diff --git a/src/rdsn/src/replica/test/CMakeLists.txt b/src/rdsn/src/replica/test/CMakeLists.txt
index 8e4dbfe..3ec38ad 100644
--- a/src/rdsn/src/replica/test/CMakeLists.txt
+++ b/src/rdsn/src/replica/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.replica.test)
 
 #Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/runtime/CMakeLists.txt b/src/rdsn/src/runtime/CMakeLists.txt
index feda8ff..736cfa2 100644
--- a/src/rdsn/src/runtime/CMakeLists.txt
+++ b/src/rdsn/src/runtime/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 add_subdirectory(test)
 add_subdirectory(rpc)
 add_subdirectory(task)
diff --git a/src/rdsn/src/runtime/rpc/CMakeLists.txt b/src/rdsn/src/runtime/rpc/CMakeLists.txt
index 08da95e..08de085 100644
--- a/src/rdsn/src/runtime/rpc/CMakeLists.txt
+++ b/src/rdsn/src/runtime/rpc/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.rpc)
 
 # Search mode for source files under CURRENT project directory?
diff --git a/src/rdsn/src/runtime/security/CMakeLists.txt b/src/rdsn/src/runtime/security/CMakeLists.txt
index 3bd807b..6c09768 100644
--- a/src/rdsn/src/runtime/security/CMakeLists.txt
+++ b/src/rdsn/src/runtime/security/CMakeLists.txt
@@ -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.
+
 set(MY_PROJ_NAME dsn.security)
 
 thrift_generate_cpp(
diff --git a/src/rdsn/src/runtime/task/CMakeLists.txt b/src/rdsn/src/runtime/task/CMakeLists.txt
index 9559dd5..ad09763 100644
--- a/src/rdsn/src/runtime/task/CMakeLists.txt
+++ b/src/rdsn/src/runtime/task/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.task)
 
 # Search mode for source files under CURRENT project directory?
diff --git a/src/rdsn/src/runtime/test/CMakeLists.txt b/src/rdsn/src/runtime/test/CMakeLists.txt
index a6f0f47..b211640 100644
--- a/src/rdsn/src/runtime/test/CMakeLists.txt
+++ b/src/rdsn/src/runtime/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_runtime_tests)
 
 # Search mode for source files under CURRENT project directory?
diff --git a/src/rdsn/src/tools/CMakeLists.txt b/src/rdsn/src/tools/CMakeLists.txt
index 08d2970..5c31f08 100644
--- a/src/rdsn/src/tools/CMakeLists.txt
+++ b/src/rdsn/src/tools/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.replication.tool)
 
 # Source files under CURRENT project directory will be automatically included.
diff --git a/src/rdsn/src/utils/CMakeLists.txt b/src/rdsn/src/utils/CMakeLists.txt
index f434520..df748de 100644
--- a/src/rdsn/src/utils/CMakeLists.txt
+++ b/src/rdsn/src/utils/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_utils)
 
 # Search mode for source files under CURRENT project directory?
diff --git a/src/rdsn/src/utils/test/CMakeLists.txt b/src/rdsn/src/utils/test/CMakeLists.txt
index 0516fa7..ab5dd8c 100644
--- a/src/rdsn/src/utils/test/CMakeLists.txt
+++ b/src/rdsn/src/utils/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn_utils_tests)
 
 # Search mode for source files under CURRENT project directory?
diff --git a/src/rdsn/src/zookeeper/CMakeLists.txt b/src/rdsn/src/zookeeper/CMakeLists.txt
index e42b2b6..ca10adc 100644
--- a/src/rdsn/src/zookeeper/CMakeLists.txt
+++ b/src/rdsn/src/zookeeper/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.replication.zookeeper_provider)
 
 
diff --git a/src/rdsn/src/zookeeper/test/CMakeLists.txt b/src/rdsn/src/zookeeper/test/CMakeLists.txt
index cb64c47..a63e6b7 100644
--- a/src/rdsn/src/zookeeper/test/CMakeLists.txt
+++ b/src/rdsn/src/zookeeper/test/CMakeLists.txt
@@ -1,3 +1,27 @@
+# The MIT License (MIT)
+#
+# Copyright (c) 2015 Microsoft Corporation
+#
+# -=- Robust Distributed System Nucleus (rDSN) -=-
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
 set(MY_PROJ_NAME dsn.zookeeper.tests)
 
 # Source files under CURRENT project directory will be automatically included.