From 61bd4ec17c2420247d6e009fa90e3e2b09876731 Mon Sep 17 00:00:00 2001 From: Willem Jiang Date: Thu, 22 Dec 2016 09:54:34 +0800 Subject: [PATCH] Added the rat plugin and fixed the issues that rat found --- benchmark/consumer.sh | 15 +++++++++++++++ benchmark/producer.sh | 14 ++++++++++++++ benchmark/runclass.sh | 14 ++++++++++++++ benchmark/tproducer.sh | 14 ++++++++++++++ checkstyle/checkstyle.xml | 6 +++--- pom.xml | 12 ++++++++++++ .../src/main/resources/transaction.sql | 18 ++++++++++++++++++ rocketmq-client/deploy.bat | 17 ++++++++++++++++- rocketmq-client/install.bat | 15 +++++++++++++++ .../remoting/protocol/protocol.sevialize.txt | 17 ++++++++++++++++- .../rocketmq/remoting/protocol/protocol.txt | 15 +++++++++++++++ 11 files changed, 152 insertions(+), 5 deletions(-) diff --git a/benchmark/consumer.sh b/benchmark/consumer.sh index e5164394..0ba054eb 100644 --- a/benchmark/consumer.sh +++ b/benchmark/consumer.sh @@ -1,5 +1,20 @@ #!/bin/sh +# 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. + # # $Id: consumer.sh 1831 2013-05-16 01:39:51Z shijia.wxr $ # diff --git a/benchmark/producer.sh b/benchmark/producer.sh index 1462257f..16552fd9 100644 --- a/benchmark/producer.sh +++ b/benchmark/producer.sh @@ -1,4 +1,18 @@ #!/bin/sh +# 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. # # $Id: producer.sh 1831 2013-05-16 01:39:51Z shijia.wxr $ diff --git a/benchmark/runclass.sh b/benchmark/runclass.sh index afe6b6ef..14e712f1 100644 --- a/benchmark/runclass.sh +++ b/benchmark/runclass.sh @@ -1,4 +1,18 @@ #!/bin/sh +# 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. # # $Id: runserver.sh 1831 2013-05-16 01:39:51Z shijia.wxr $ diff --git a/benchmark/tproducer.sh b/benchmark/tproducer.sh index f19d2c68..4aca55c7 100644 --- a/benchmark/tproducer.sh +++ b/benchmark/tproducer.sh @@ -1,4 +1,18 @@ #!/bin/sh +# 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. # # $Id: producer.sh 1831 2013-05-16 01:39:51Z shijia.wxr $ diff --git a/checkstyle/checkstyle.xml b/checkstyle/checkstyle.xml index ac562fac..c2d97824 100644 --- a/checkstyle/checkstyle.xml +++ b/checkstyle/checkstyle.xml @@ -28,7 +28,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -125,4 +125,4 @@ - \ No newline at end of file + diff --git a/pom.xml b/pom.xml index 381cdb12..8c20a239 100644 --- a/pom.xml +++ b/pom.xml @@ -332,6 +332,18 @@ + + org.apache.rat + apache-rat-plugin + 0.12 + + + .travis.yml + CONTRIBUTING.md + bin/README.md + + + maven-resources-plugin 3.0.2 diff --git a/rocketmq-broker/src/main/resources/transaction.sql b/rocketmq-broker/src/main/resources/transaction.sql index aaefe433..881714c3 100644 --- a/rocketmq-broker/src/main/resources/transaction.sql +++ b/rocketmq-broker/src/main/resources/transaction.sql @@ -1,3 +1,21 @@ +-- +-- 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. +-- CREATE TABLE t_transaction( offset NUMERIC(20) PRIMARY KEY, producerGroup VARCHAR(64) diff --git a/rocketmq-client/deploy.bat b/rocketmq-client/deploy.bat index f7780708..ffc21442 100644 --- a/rocketmq-client/deploy.bat +++ b/rocketmq-client/deploy.bat @@ -1 +1,16 @@ -mvn -Dmaven.test.skip=true deploy -Pclient-shade \ No newline at end of file +REM Licensed to the Apache Software Foundation (ASF) under one or more +REM contributor license agreements. See the NOTICE file distributed with +REM this work for additional information regarding copyright ownership. +REM The ASF licenses this file to You under the Apache License, Version 2.0 +REM (the "License"); you may not use this file except in compliance with +REM the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. + +mvn -Dmaven.test.skip=true deploy -Pclient-shade diff --git a/rocketmq-client/install.bat b/rocketmq-client/install.bat index 87bf456d..31efffdf 100644 --- a/rocketmq-client/install.bat +++ b/rocketmq-client/install.bat @@ -1,2 +1,17 @@ +REM Licensed to the Apache Software Foundation (ASF) under one or more +REM contributor license agreements. See the NOTICE file distributed with +REM this work for additional information regarding copyright ownership. +REM The ASF licenses this file to You under the Apache License, Version 2.0 +REM (the "License"); you may not use this file except in compliance with +REM the License. You may obtain a copy of the License at +REM +REM http://www.apache.org/licenses/LICENSE-2.0 +REM +REM Unless required by applicable law or agreed to in writing, software +REM distributed under the License is distributed on an "AS IS" BASIS, +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +REM See the License for the specific language governing permissions and +REM limitations under the License. + mvn -Dmaven.test.skip=true clean package install -Pclient-shade -U diff --git a/rocketmq-remoting/src/main/java/com/alibaba/rocketmq/remoting/protocol/protocol.sevialize.txt b/rocketmq-remoting/src/main/java/com/alibaba/rocketmq/remoting/protocol/protocol.sevialize.txt index 976cdf29..3dc5ba52 100644 --- a/rocketmq-remoting/src/main/java/com/alibaba/rocketmq/remoting/protocol/protocol.sevialize.txt +++ b/rocketmq-remoting/src/main/java/com/alibaba/rocketmq/remoting/protocol/protocol.sevialize.txt @@ -1,6 +1,21 @@ +# 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. + // // Remoting protocol V0.1 draft // // protocol
// 1 2 3 4 -// \ No newline at end of file +// diff --git a/rocketmq-remoting/src/main/java/com/alibaba/rocketmq/remoting/protocol/protocol.txt b/rocketmq-remoting/src/main/java/com/alibaba/rocketmq/remoting/protocol/protocol.txt index 7444cbbd..3dc5ba52 100644 --- a/rocketmq-remoting/src/main/java/com/alibaba/rocketmq/remoting/protocol/protocol.txt +++ b/rocketmq-remoting/src/main/java/com/alibaba/rocketmq/remoting/protocol/protocol.txt @@ -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. + // // Remoting protocol V0.1 draft // -- GitLab