diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fcc40c1112..ddf705cfed 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -20,10 +20,10 @@ --> -Fixes ISSUE#. +Fixes ISSUE #. ### Motivation diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b302599843..d6a99ee7d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,12 @@ on: push: branches: - develop + - master - '[0-9]+.[0-9]+.[0-9]+**' pull_request: branches: - develop + - master - '[0-9]+.[0-9]+.[0-9]+**' workflow_dispatch: @@ -50,34 +52,11 @@ jobs: java-version: ${{ matrix.java }} - name: Build - # We use -x check to skip check code style here, since this task will check all files. - # We use Checkstyle task to check the added file - run: ./gradlew clean build jar dist jacocoTestReport -x check + run: ./gradlew clean build jar dist jacocoTestReport - name: Install plugin run: ./gradlew installPlugin - checkstyle: - name: Checkstyle - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Download checkstyle exectable - run: wget -O - -q https://github.com/checkstyle/checkstyle/releases/download/checkstyle-8.44/checkstyle-8.44-all.jar > ./checkstyle.jar - - - name: Download reviewdog exectable - run: wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b . v0.12.0 - - - name: Check code style - env: - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - java -jar ./checkstyle.jar -c ./style/checkStyle.xml -f xml ./eventmesh-* \ - | ./reviewdog -f=checkstyle -reporter=github-pr-check -filter-mode=added -fail-on-error - license-check: name: License Check runs-on: ubuntu-latest diff --git a/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/pub/cloudevents/AsyncPublishInstance.java b/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/pub/cloudevents/AsyncPublishInstance.java index 59406f8917..fd3b1f475c 100644 --- a/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/pub/cloudevents/AsyncPublishInstance.java +++ b/eventmesh-examples/src/main/java/org/apache/eventmesh/http/demo/pub/cloudevents/AsyncPublishInstance.java @@ -100,7 +100,7 @@ public static void main(String[] args) throws Exception { .withExtension(Constants.EVENTMESH_MESSAGE_CONST_TTL, String.valueOf(4 * 1000)) .build(); eventMeshHttpProducer.publish(event); - log.info("publish event success content:{}",content); + log.info("publish event success content:{}", content); } Thread.sleep(30000); } diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/consumer/ConsumerManager.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/consumer/ConsumerManager.java index c2b8f461df..1d41b95aea 100644 --- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/consumer/ConsumerManager.java +++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/consumer/ConsumerManager.java @@ -147,7 +147,7 @@ public void start() throws Exception { try { notifyConsumerManager(consumerGroup, consumerGroupConf); } catch (Exception e) { - logger.error("notifyConsumerManager error",e); + logger.error("notifyConsumerManager error", e); } } @@ -158,7 +158,7 @@ public void start() throws Exception { try { notifyConsumerManager(consumerGroup, null); } catch (Exception e) { - logger.error("notifyConsumerManager error",e); + logger.error("notifyConsumerManager error", e); } eventMeshHTTPServer.localConsumerGroupMapping.keySet() diff --git a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/producer/EventMeshHttpProducer.java b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/producer/EventMeshHttpProducer.java index 5b63861dae..a7e0a43637 100644 --- a/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/producer/EventMeshHttpProducer.java +++ b/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/http/producer/EventMeshHttpProducer.java @@ -63,17 +63,17 @@ public Message request(final Message openMessage, final long timeout) throws Eve return openMessageProducer.request(openMessage, timeout); } - public void request(final EventMeshMessage message, final RRCallback rrCallback, final long timeout) + public void request(final EventMeshMessage message, final RRCallback rrCallback, final long timeout) throws EventMeshException { eventMeshMessageProducer.request(message, rrCallback, timeout); } - public void request(final CloudEvent cloudEvent, final RRCallback rrCallback, final long timeout) + public void request(final CloudEvent cloudEvent, final RRCallback rrCallback, final long timeout) throws EventMeshException { cloudEventProducer.request(cloudEvent, rrCallback, timeout); } - public void request(final Message openMessage, final RRCallback rrCallback, final long timeout) + public void request(final Message openMessage, final RRCallback rrCallback, final long timeout) throws EventMeshException { openMessageProducer.request(openMessage, rrCallback, timeout); } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2e6e5897b5..fc9e13bc0c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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. +# + distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip diff --git a/gradlew b/gradlew index 744e882ed5..046727c2b0 100755 --- a/gradlew +++ b/gradlew @@ -1,13 +1,14 @@ #!/usr/bin/env sh # -# Copyright 2015 the original author or authors. +# 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 # -# Licensed 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 -# -# https://www.apache.org/licenses/LICENSE-2.0 +# 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, diff --git a/gradlew.bat b/gradlew.bat index 477c896641..1e4bda9110 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,11 +1,12 @@ @rem -@rem Copyright 2015 the original author or authors. +@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 Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 +@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,