This is an automated email from the ASF dual-hosted git repository. huxing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push: new b2c5cb7 [DUBBO-9]add apache-rat-plugin to check asf license header (#1647) b2c5cb7 is described below commit b2c5cb76522e000565e5595ae8029fe717091f75 Author: Xin Wang <lovep...@hotmail.com> AuthorDate: Mon Apr 23 11:28:22 2018 +0800 [DUBBO-9]add apache-rat-plugin to check asf license header (#1647) * [DUBBO-9]add apache-rat-plugin to check asf license header * reformat EagerThreadPoolExecutorTest.java * remove the asf header check of checkstyle plugin --- codestyle/checkstyle-header.txt | 16 ------- codestyle/checkstyle.xml | 5 -- .../extensionloader/ext9_empty/Ext9Empty.java | 16 +++++++ .../ext9_empty/impl/Ext9EmptyImpl.java | 16 +++++++ .../support/eager/EagerThreadPoolExecutorTest.java | 33 +++++++++---- .../annotation/provider/HelloServiceImpl.java | 16 +++++++ .../src/test/java/$__ClassNameTestDubboStub.java | 18 +++++++- .../src/test/java/ClassNameTestDubbo.java | 18 +++++++- .../alibaba/dubbo/rpc/gen/dubbo/$__DemoStub.java | 18 +++++++- .../java/com/alibaba/dubbo/rpc/gen/dubbo/Demo.java | 18 +++++++- hessian-lite/pom.xml | 1 - .../caucho/hessian/io/LocaleSerializerTest.java | 16 +++++++ .../caucho/hessian/io/base/SerializeTestBase.java | 16 +++++++ .../com/caucho/hessian/io/beans/SubUser.java | 16 +++++++ pom.xml | 54 ++++++++++++++++++++++ 15 files changed, 241 insertions(+), 36 deletions(-) diff --git a/codestyle/checkstyle-header.txt b/codestyle/checkstyle-header.txt deleted file mode 100644 index e87628e..0000000 --- a/codestyle/checkstyle-header.txt +++ /dev/null @@ -1,16 +0,0 @@ -^\Q/*\E$ -^\Q * Licensed to the Apache Software Foundation (ASF) under one or more\E$ -^\Q * contributor license agreements. See the NOTICE file distributed with\E$ -^\Q * this work for additional information regarding copyright ownership.\E$ -^\Q * The ASF licenses this file to You under the Apache License, Version 2.0\E$ -^\Q * (the "License"); you may not use this file except in compliance with\E$ -^\Q * the License. You may obtain a copy of the License at\E$ -^\Q *\E$ -^\Q * http://www.apache.org/licenses/LICENSE-2.0\E$ -^\Q *\E$ -^\Q * Unless required by applicable law or agreed to in writing, software\E$ -^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$ -^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$ -^\Q * See the License for the specific language governing permissions and\E$ -^\Q * limitations under the License.\E$ -^\Q */\E$ \ No newline at end of file diff --git a/codestyle/checkstyle.xml b/codestyle/checkstyle.xml index a8923fa..ffdafd1 100644 --- a/codestyle/checkstyle.xml +++ b/codestyle/checkstyle.xml @@ -6,11 +6,6 @@ <module name="Checker"> <property name="charset" value="UTF-8"/> <property name="fileExtensions" value="java"/> - <!-- Root Checks --> - <module name="com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderCheck"> - <property name="headerFile" value="${checkstyle.header.file}" /> - <property name="fileExtensions" value="java" /> - </module> <!-- TreeWalker Checks --> <module name="TreeWalker"> diff --git a/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext9_empty/Ext9Empty.java b/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext9_empty/Ext9Empty.java index b13bea6..388e8f9 100644 --- a/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext9_empty/Ext9Empty.java +++ b/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext9_empty/Ext9Empty.java @@ -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. + */ package com.alibaba.dubbo.common.extensionloader.ext9_empty; import com.alibaba.dubbo.common.extension.SPI; diff --git a/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext9_empty/impl/Ext9EmptyImpl.java b/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext9_empty/impl/Ext9EmptyImpl.java index 68430c5..cc9dad1 100644 --- a/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext9_empty/impl/Ext9EmptyImpl.java +++ b/dubbo-common/src/test/java/com/alibaba/dubbo/common/extensionloader/ext9_empty/impl/Ext9EmptyImpl.java @@ -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. + */ package com.alibaba.dubbo.common.extensionloader.ext9_empty.impl; import com.alibaba.dubbo.common.extensionloader.ext9_empty.Ext9Empty; diff --git a/dubbo-common/src/test/java/com/alibaba/dubbo/common/threadpool/support/eager/EagerThreadPoolExecutorTest.java b/dubbo-common/src/test/java/com/alibaba/dubbo/common/threadpool/support/eager/EagerThreadPoolExecutorTest.java index a9aeca2..67b5882 100644 --- a/dubbo-common/src/test/java/com/alibaba/dubbo/common/threadpool/support/eager/EagerThreadPoolExecutorTest.java +++ b/dubbo-common/src/test/java/com/alibaba/dubbo/common/threadpool/support/eager/EagerThreadPoolExecutorTest.java @@ -1,11 +1,27 @@ +/* + * 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 com.alibaba.dubbo.common.threadpool.support.eager; - import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.common.extension.ExtensionLoader; import com.alibaba.dubbo.common.threadpool.ThreadPool; import com.alibaba.dubbo.common.threadpool.support.AbortPolicyWithReport; import com.alibaba.dubbo.common.utils.NamedThreadFactory; + import org.junit.Assert; import org.junit.Test; @@ -62,12 +78,8 @@ public class EagerThreadPoolExecutorTest { executor.execute(new Runnable() { @Override public void run() { - System.out.println("thread number in current pool:" - + executor.getPoolSize() - + ", task number in task queue:" - + executor.getQueue().size() - + " executor size: " - + executor.getPoolSize()); + System.out.println("thread number in current pool:" + executor.getPoolSize() + ", task number in task queue:" + executor.getQueue() + .size() + " executor size: " + executor.getPoolSize()); try { Thread.sleep(1000); } catch (InterruptedException e) { @@ -83,11 +95,12 @@ public class EagerThreadPoolExecutorTest { @Test public void testSPI() { - ExecutorService executorService = (ExecutorService) ExtensionLoader - .getExtensionLoader(ThreadPool.class) + ExecutorService executorService = (ExecutorService) ExtensionLoader.getExtensionLoader(ThreadPool.class) .getExtension("eager") .getExecutor(URL); Assert.assertTrue("test spi fail!", - executorService.getClass().getSimpleName().equals("EagerThreadPoolExecutor")); + executorService.getClass() + .getSimpleName() + .equals("EagerThreadPoolExecutor")); } } \ No newline at end of file diff --git a/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/context/annotation/provider/HelloServiceImpl.java b/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/context/annotation/provider/HelloServiceImpl.java index ac369c5..9d0fdbb 100644 --- a/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/context/annotation/provider/HelloServiceImpl.java +++ b/dubbo-config/dubbo-config-spring/src/test/java/com/alibaba/dubbo/config/spring/context/annotation/provider/HelloServiceImpl.java @@ -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. + */ package com.alibaba.dubbo.config.spring.context.annotation.provider; import com.alibaba.dubbo.config.annotation.Service; diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/$__ClassNameTestDubboStub.java b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/$__ClassNameTestDubboStub.java index d2da761..a60c7b6 100644 --- a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/$__ClassNameTestDubboStub.java +++ b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/$__ClassNameTestDubboStub.java @@ -1,4 +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. + */ +/* * Autogenerated by Dubbo Compiler (0.1.0) * <p> * Thrift (0.7.0) diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestDubbo.java b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestDubbo.java index 2ca0e79..f0a203c 100644 --- a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestDubbo.java +++ b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestDubbo.java @@ -1,4 +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. + */ +/* * Autogenerated by Dubbo Compiler (0.1.0) * <p> * Thrift (0.7.0) diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/$__DemoStub.java b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/$__DemoStub.java index 57e5800..0b49afb 100644 --- a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/$__DemoStub.java +++ b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/$__DemoStub.java @@ -1,4 +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. + */ +/* * Autogenerated by Dubbo Compiler (0.1.0) * <p> * Thrift (0.7.0) diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/Demo.java b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/Demo.java index c6bfbc1..382adf3 100644 --- a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/Demo.java +++ b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/Demo.java @@ -1,4 +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. + */ +/* * Autogenerated by Dubbo Compiler (0.1.0) * <p> * Thrift (0.7.0) diff --git a/hessian-lite/pom.xml b/hessian-lite/pom.xml index 584c84a..07eec26 100644 --- a/hessian-lite/pom.xml +++ b/hessian-lite/pom.xml @@ -1,4 +1,3 @@ -<?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 diff --git a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/LocaleSerializerTest.java b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/LocaleSerializerTest.java index 73cdd3f..a345dda 100644 --- a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/LocaleSerializerTest.java +++ b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/LocaleSerializerTest.java @@ -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. + */ package com.alibaba.com.caucho.hessian.io; import java.io.IOException; diff --git a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/base/SerializeTestBase.java b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/base/SerializeTestBase.java index ab889f7..587070f 100644 --- a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/base/SerializeTestBase.java +++ b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/base/SerializeTestBase.java @@ -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. + */ package com.alibaba.com.caucho.hessian.io.base; import com.alibaba.com.caucho.hessian.io.Hessian2Input; diff --git a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/beans/SubUser.java b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/beans/SubUser.java index 1bf6b6c..3c7214f 100644 --- a/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/beans/SubUser.java +++ b/hessian-lite/src/test/java/com/alibaba/com/caucho/hessian/io/beans/SubUser.java @@ -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. + */ package com.alibaba.com.caucho.hessian.io.beans; import java.io.Serializable; diff --git a/pom.xml b/pom.xml index f7bcfff..96ba402 100644 --- a/pom.xml +++ b/pom.xml @@ -115,6 +115,7 @@ <maven_jetty_version>6.1.26</maven_jetty_version> <maven_checkstyle_version>3.0.0</maven_checkstyle_version> <maven_jacoco_version>0.8.1</maven_jacoco_version> + <apache-rat-plugin.version>0.12</apache-rat-plugin.version> </properties> <modules> @@ -443,6 +444,56 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <version>${apache-rat-plugin.version}</version> + <executions> + <execution> + <id>verify.rat</id> + <phase>verify</phase> + <goals> + <goal>check</goal> + </goals> + <configuration> + <excludes> + <exclude>**/*.versionsBackup</exclude> + <exclude>**/.idea/</exclude> + <exclude>**/*.iml</exclude> + <exclude>**/*.txt</exclude> + <exclude>**/*.load</exclude> + <exclude>**/*.flex</exclude> + <exclude>**/*.fc</exclude> + <exclude>**/*.javascript</exclude> + <exclude>**/*.properties</exclude> + <exclude>**/*.thrift</exclude> + <exclude>**/*.sh</exclude> + <exclude>**/*.bat</exclude> + <exclude>**/*.md</exclude> + <exclude>.git/</exclude> + <exclude>.gitignore</exclude> + <!-- ASF jenkins box puts the Maven repo in our root directory. --> + <exclude>.repository/</exclude> + <exclude>**/.settings/*</exclude> + <exclude>**/.classpath</exclude> + <exclude>**/.project</exclude> + <exclude>**/target/**</exclude> + <exclude>**/*.log</exclude> + <exclude>CODE_OF_CONDUCT.md</exclude> + <exclude>.codecov.yml</exclude> + <exclude>.travis.yml</exclude> + <exclude>PULL_REQUEST_TEMPLATE.md</exclude> + <exclude>CONTRIBUTING.md</exclude> + <exclude>README.md</exclude> + <exclude>**/codestyle/*</exclude> + <exclude>**/resources/META-INF/**</exclude> + <!-- exclude the hessian-lite files --> + <exclude>**/com/caucho/hessian/**</exclude> + </excludes> + </configuration> + </execution> + </executions> + </plugin> </plugins> <pluginManagement> @@ -520,6 +571,9 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.3</version> + <configuration> + <createDependencyReducedPom>false</createDependencyReducedPom> + </configuration> </plugin> <plugin> <groupId>org.mortbay.jetty</groupId> -- To stop receiving notification emails like this one, please contact hux...@apache.org.