From 043cf816f36458419c96100a1d9b5ac65f510848 Mon Sep 17 00:00:00 2001 From: xwm1992 Date: Fri, 23 Sep 2022 17:46:05 +0800 Subject: [PATCH 1/2] [ISSUE #1378] Add eventmesh filter plugin module --- eventmesh-filter-plugin/build.gradle | 16 +++++++++++++ .../eventmesh-filter-api/build.gradle | 23 +++++++++++++++++++ .../eventmesh-filter-api/gradle.properties | 16 +++++++++++++ settings.gradle | 2 ++ 4 files changed, 57 insertions(+) create mode 100644 eventmesh-filter-plugin/build.gradle create mode 100644 eventmesh-filter-plugin/eventmesh-filter-api/build.gradle create mode 100644 eventmesh-filter-plugin/eventmesh-filter-api/gradle.properties diff --git a/eventmesh-filter-plugin/build.gradle b/eventmesh-filter-plugin/build.gradle new file mode 100644 index 0000000000..d973dcedae --- /dev/null +++ b/eventmesh-filter-plugin/build.gradle @@ -0,0 +1,16 @@ +/* + * 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. + */ \ No newline at end of file diff --git a/eventmesh-filter-plugin/eventmesh-filter-api/build.gradle b/eventmesh-filter-plugin/eventmesh-filter-api/build.gradle new file mode 100644 index 0000000000..51e1465ceb --- /dev/null +++ b/eventmesh-filter-plugin/eventmesh-filter-api/build.gradle @@ -0,0 +1,23 @@ +/* + * 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. + */ + +dependencies { + api project(":eventmesh-spi") + api project(":eventmesh-common") + + implementation "io.cloudevents:cloudevents-core" +} \ No newline at end of file diff --git a/eventmesh-filter-plugin/eventmesh-filter-api/gradle.properties b/eventmesh-filter-plugin/eventmesh-filter-api/gradle.properties new file mode 100644 index 0000000000..a9fd83fea0 --- /dev/null +++ b/eventmesh-filter-plugin/eventmesh-filter-api/gradle.properties @@ -0,0 +1,16 @@ +# +# 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. +# \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index dca98b256f..276eebd480 100644 --- a/settings.gradle +++ b/settings.gradle @@ -63,3 +63,5 @@ include 'eventmesh-webhook:eventmesh-webhook-api' include 'eventmesh-webhook:eventmesh-webhook-admin' include 'eventmesh-webhook:eventmesh-webhook-receive' +include 'eventmesh-filter-plugin' +include 'eventmesh-filter-plugin:eventmesh-filter-api' From f93a10d12bc8e20e5f246bc222d2379919454a74 Mon Sep 17 00:00:00 2001 From: githublaohu <2372554140@qq.com> Date: Fri, 28 Oct 2022 17:18:32 +0800 Subject: [PATCH 2/2] [ISSUE #2002] fix ci compile error --- .../eventmesh/selector/NacosSelector.java | 17 +++++++++++++++++ .../receive/protocol/GithubProtocol.java | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/selector/NacosSelector.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/selector/NacosSelector.java index 35a6f0a002..e2bafba3df 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/selector/NacosSelector.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/selector/NacosSelector.java @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.eventmesh.selector; import org.apache.eventmesh.client.selector.Selector; diff --git a/eventmesh-webhook/eventmesh-webhook-receive/src/main/java/org/apache/eventmesh/webhook/receive/protocol/GithubProtocol.java b/eventmesh-webhook/eventmesh-webhook-receive/src/main/java/org/apache/eventmesh/webhook/receive/protocol/GithubProtocol.java index 1980c0c7ed..da3c87e9ae 100644 --- a/eventmesh-webhook/eventmesh-webhook-receive/src/main/java/org/apache/eventmesh/webhook/receive/protocol/GithubProtocol.java +++ b/eventmesh-webhook/eventmesh-webhook-receive/src/main/java/org/apache/eventmesh/webhook/receive/protocol/GithubProtocol.java @@ -43,7 +43,7 @@ public class GithubProtocol implements ManufacturerProtocol { private static final String H_MAC_SHA = "HmacSHA256"; - private static final Char ZERO_CHAR = '0'; + private static final char ZERO_CHAR = '0'; public Logger logger = LoggerFactory.getLogger(this.getClass());