diff --git a/.github/workflows/maven_build.yml b/.github/workflows/maven_build_master.yml similarity index 88% rename from .github/workflows/maven_build.yml rename to .github/workflows/maven_build_master.yml index fa919f19f00fdace54701019259bc94f27044859..45e0a93d25483106dc91f8cfe5cc45a9fe184a80 100644 --- a/.github/workflows/maven_build.yml +++ b/.github/workflows/maven_build_master.yml @@ -1,7 +1,7 @@ -name: Maven Build +name: Maven Build on Master Branch on: - pull_request: + push: branches: - master diff --git a/.github/workflows/maven_build_pr.yml b/.github/workflows/maven_build_pr.yml new file mode 100644 index 0000000000000000000000000000000000000000..03a8bad4484a3e2c0fbf6c1deed8fe4140bcc339 --- /dev/null +++ b/.github/workflows/maven_build_pr.yml @@ -0,0 +1,22 @@ +name: Maven Build on Pull Request + +on: + pull_request: + paths-ignore: + - 'docs/**' + - '**.md' + - '.*' + +jobs: + build: + name: Maven Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'zulu' + - name: Build with Maven + run: mvn clean install diff --git a/.github/workflows/maven_publish_snapshot.yml b/.github/workflows/maven_publish_snapshot.yml deleted file mode 100644 index 0aece4c1022d817bb4a72eb69c408efcc3c26c86..0000000000000000000000000000000000000000 --- a/.github/workflows/maven_publish_snapshot.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Maven Publish Snapshot - -on: - push: - branches: - - master - paths-ignore: - - '.github/**' - - 'docs/**' - - 'scripts/**' - - '**.md' - - '.*' - -jobs: - publish-snapshot: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup Apache Maven Central - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'zulu' - server-id: sonatype-nexus-snapshots - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - gpg-passphrase: GPG_PASSPHRASE - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - - name: Publish to Apache Maven Central - run: mvn clean verify gpg:sign install:install deploy:deploy - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/README.md b/README.md index 80e4b094d8110caf2ce274f1c5685f8f4d69faf6..94793d0bca9f2bdd4244d1219a42277db7c8db55 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ OceanBase Log Client English | [简体中文](README_CN.md) -[![Build Status](https://github.com/oceanbase/oblogclient/actions/workflows/maven_publish_snapshot.yml/badge.svg?branch=master)](https://github.com/oceanbase/oblogclient/actions/workflows/maven_publish_snapshot.yml) +[![Build Status](https://github.com/oceanbase/oblogclient/actions/workflows/maven_build_master.yml/badge.svg?branch=master)](https://github.com/oceanbase/oblogclient/actions/workflows/maven_build_master.yml) [![Release](https://img.shields.io/github/release/oceanbase/oblogclient.svg)](https://github.com/oceanbase/oblogclient/releases) [![License](https://img.shields.io/badge/license-Mulan%20PSL%20v2-green.svg)](LICENSE) diff --git a/README_CN.md b/README_CN.md index 6be63d7c1347f8ffa8dd5bc98d55166f5d83627c..d75069cc61641693d318ce14d092cca3a5f7a98a 100644 --- a/README_CN.md +++ b/README_CN.md @@ -3,7 +3,7 @@ OceanBase 日志客户端 [English](README.md) | 简体中文 -[![Build Status](https://github.com/oceanbase/oblogclient/actions/workflows/maven_publish_snapshot.yml/badge.svg?branch=master)](https://github.com/oceanbase/oblogclient/actions/workflows/maven_publish_snapshot.yml) +[![Build Status](https://github.com/oceanbase/oblogclient/actions/workflows/maven_build_master.yml/badge.svg?branch=master)](https://github.com/oceanbase/oblogclient/actions/workflows/maven_build_master.yml) [![Release](https://img.shields.io/github/release/oceanbase/oblogclient.svg)](https://github.com/oceanbase/oblogclient/releases) [![License](https://img.shields.io/badge/license-Mulan%20PSL%20v2-green.svg)](LICENSE) diff --git a/oblogclient-logproxy/src/main/java/com/oceanbase/clogproxy/client/connection/ClientHandlerV01.java b/oblogclient-logproxy/src/main/java/com/oceanbase/clogproxy/client/connection/ClientHandlerV01.java index 90613b444d75f6d749aac0e5127770b6400f6dd3..17f3e0186cfa107d19a9c676b2a7efca7c83b4aa 100644 --- a/oblogclient-logproxy/src/main/java/com/oceanbase/clogproxy/client/connection/ClientHandlerV01.java +++ b/oblogclient-logproxy/src/main/java/com/oceanbase/clogproxy/client/connection/ClientHandlerV01.java @@ -31,7 +31,7 @@ import org.apache.commons.lang3.Conversion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/* Compatitable for legacy V0 and V1 only, however you should not use */ +/** Compatible for legacy V0 and V1 only, however you should not use */ public class ClientHandlerV01 { private static final Logger logger = LoggerFactory.getLogger(ClientHandlerV01.class); diff --git a/oblogclient-logproxy/src/main/java/com/oceanbase/clogproxy/client/exception/LogProxyClientException.java b/oblogclient-logproxy/src/main/java/com/oceanbase/clogproxy/client/exception/LogProxyClientException.java index 68bead50a440190db1129e4c56acc9c2600dd54e..ebbcc154943273bdf4954b45fb366721e13ab8bf 100644 --- a/oblogclient-logproxy/src/main/java/com/oceanbase/clogproxy/client/exception/LogProxyClientException.java +++ b/oblogclient-logproxy/src/main/java/com/oceanbase/clogproxy/client/exception/LogProxyClientException.java @@ -10,6 +10,7 @@ See the Mulan PSL v2 for more details. */ package com.oceanbase.clogproxy.client.exception; + import com.oceanbase.clogproxy.client.enums.ErrorCode; /** @@ -93,7 +94,7 @@ public class LogProxyClientException extends RuntimeException { * @param needStop The flag of whether the client should stop the stream. */ public LogProxyClientException( - ErrorCode code, String message, Throwable throwable, boolean needStop) { + ErrorCode code, String message, Throwable throwable, boolean needStop) { super(message, throwable); this.code = code; this.needStop = needStop; diff --git a/pom.xml b/pom.xml index be2dc4662d08c5065f6662199681e422dad70d8d..20100eb2541696e825f578957faa322c4767de0e 100644 --- a/pom.xml +++ b/pom.xml @@ -188,6 +188,9 @@ See the Mulan PSL v2 for more details. jar + + true + @@ -261,7 +264,7 @@ See the Mulan PSL v2 for more details. spotless-check validate - apply + check