You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2021/05/21 08:14:29 UTC
[apisix-java-plugin-runner] branch main updated: ci: introduce
header checker (#6)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/apisix-java-plugin-runner.git
The following commit(s) were added to refs/heads/main by this push:
new ebfdd5c ci: introduce header checker (#6)
ebfdd5c is described below
commit ebfdd5c234a6d13b76e754bdd33cd1cb3e6d8d8a
Author: Daming <zt...@foxmail.com>
AuthorDate: Fri May 21 16:14:21 2021 +0800
ci: introduce header checker (#6)
---
.gitignore | 18 ++++++++++++++++++
src/main/bin/shutdown.sh => .licenserc.yaml | 17 ++++++++++++++++-
.../src/main/resources/META-INF/srping.factories | 16 ++++++++++++++++
src/main/bin/shutdown.sh | 1 +
src/main/bin/startup.sh | 1 +
src/main/checkstyle/HEADER | 18 ------------------
src/main/checkstyle/checkstyle.xml | 5 -----
7 files changed, 52 insertions(+), 24 deletions(-)
diff --git a/.gitignore b/.gitignore
index 13426a9..71acd23 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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.
+#
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
diff --git a/src/main/bin/shutdown.sh b/.licenserc.yaml
similarity index 76%
copy from src/main/bin/shutdown.sh
copy to .licenserc.yaml
index fdc7bab..1a12584 100644
--- a/src/main/bin/shutdown.sh
+++ b/.licenserc.yaml
@@ -1,4 +1,3 @@
-#!/usr/bin/env 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
@@ -14,3 +13,19 @@
# 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.
+
+header:
+ license:
+ spdx-id: Apache-2.0
+ copyright-owner: Apache Software Foundation
+
+ paths-ignore:
+ - 'dist'
+ - 'licenses'
+ - '**/*.md'
+ - 'LICENSE'
+ - 'NOTICE'
+ - '.mvn'
+ - '**/target/**'
+
+ comment: on-failure
diff --git a/runner-starter/src/main/resources/META-INF/srping.factories b/runner-starter/src/main/resources/META-INF/srping.factories
index da9ce3c..37a8f50 100644
--- a/runner-starter/src/main/resources/META-INF/srping.factories
+++ b/runner-starter/src/main/resources/META-INF/srping.factories
@@ -1 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
org.springframework.context.ApplicationListener=org.apache.apisix.plugin.runner.component.Listener
\ No newline at end of file
diff --git a/src/main/bin/shutdown.sh b/src/main/bin/shutdown.sh
index fdc7bab..54305cb 100644
--- a/src/main/bin/shutdown.sh
+++ b/src/main/bin/shutdown.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env 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
diff --git a/src/main/bin/startup.sh b/src/main/bin/startup.sh
index fdc7bab..54305cb 100644
--- a/src/main/bin/startup.sh
+++ b/src/main/bin/startup.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env 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
diff --git a/src/main/checkstyle/HEADER b/src/main/checkstyle/HEADER
deleted file mode 100644
index 00e3b09..0000000
--- a/src/main/checkstyle/HEADER
+++ /dev/null
@@ -1,18 +0,0 @@
-^<\?xml version="1\.0" encoding="UTF-8"\?>$
-^<!--$
-^ *(/\*|#|~)$
-^ *(\*|#|~) +Licensed to the Apache Software Foundation \(ASF\) under one or more$
-^ *(\*|#|~) +contributor license agreements\. See the NOTICE file distributed with$
-^ *(\*|#|~) +this work for additional information regarding copyright ownership\.$
-^ *(\*|#|~) +The ASF licenses this file to You under the Apache License, Version 2\.0$
-^ *(\*|#|~) +\(the "License"\); you may not use this file except in compliance with$
-^ *(\*|#|~) +the License\. You may obtain a copy of the License at$
-^ *(\*|#|~)$
-^ *(\*|#|~) +http://www\.apache\.org/licenses/LICENSE-2\.0$
-^ *(\*|#|~)$
-^ *(\*|#|~) +Unless required by applicable law or agreed to in writing, software$
-^ *(\*|#|~) +distributed under the License is distributed on an "AS IS" BASIS,$
-^ *(\*|#|~) +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$
-^ *(\*|#|~) +See the License for the specific language governing permissions and$
-^ *(\*|#|~) +limitations under the License\.$
-^ *(\*|#|~)$
diff --git a/src/main/checkstyle/checkstyle.xml b/src/main/checkstyle/checkstyle.xml
index 6cd3658..039eff6 100644
--- a/src/main/checkstyle/checkstyle.xml
+++ b/src/main/checkstyle/checkstyle.xml
@@ -28,11 +28,6 @@
<property name="eachLine" value="true"/>
</module>
- <module name="RegexpHeader">
- <property name="headerFile" value="${checkstyle.header.file}"/>
- <property name="multiLines" value="1, 2, 3, 18"/>
- </module>
-
<module name="RegexpSingleline">
<property name="format" value="System\.out\.println"/>
<property name="message" value="Prohibit invoking System.out.println in source code !"/>