Skip to content

Commit

Permalink
refactor: rearrange project structure
Browse files Browse the repository at this point in the history
Signed-off-by: ZhangJian He <shoothzj@gmail.com>
  • Loading branch information
ZhangJian He committed Aug 28, 2024
1 parent 4664e66 commit 63a2a3a
Show file tree
Hide file tree
Showing 42 changed files with 107 additions and 20 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/commit_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: commit lint
on:
pull_request:
branches:
- main

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v5
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: checkstyle
name: java checkstyle
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
checkstyle:
java_checkstyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: spot bugs
name: java spotbugs
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
spotbugs:
java_spotbugs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/java_spotless.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: java spotless
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
java_spotless:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: spotless
run: mvn -B spotless:check
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: unit tests
name: java unit tests
on:
push:
branches:
Expand All @@ -8,18 +8,14 @@ on:
- main

jobs:
unit-tests:
java_unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: unit tests
run: mvn -B clean test
- uses: codecov/codecov-action@v2
with:
files: ./java-tool/target/site/jacoco/jacoco.xml,./sdk-codec-bk/target/site/jacoco/jacoco.xml
flags: unittests
13 changes: 13 additions & 0 deletions .github/workflows/typo_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: typo check
on:
pull_request:
branches:
- main
jobs:
typo_check:
name: typo check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check typos
uses: crate-ci/typos@master
14 changes: 14 additions & 0 deletions bookkeeper-admin-jdk/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.github.protocol-laboratory</groupId>
<artifactId>bookkeeper-admin-parent</artifactId>
<version>0.0.1</version>
</parent>

<artifactId>bookkeeper-admin-jdk</artifactId>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public interface AutoRecovery {

void recoveryBookie(RecoveryBookieReqData reqData) throws BookkeeperAdminException;

UnderReplicatedLedger listUnderReplicatedLedger(ListUnderReplicatedLedgerReqData reqData)
UnderReplicatedLedger listUnderReplicatedLedger(ListUnderReplicatedLedgerReqData reqData)
throws BookkeeperAdminException;

Auditor whoIsAuditor() throws BookkeeperAdminException;
Expand Down
File renamed without changes.
37 changes: 31 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
<modelVersion>4.0.0</modelVersion>

<groupId>io.github.protocol-laboratory</groupId>
<artifactId>bookkeeper-admin-java</artifactId>
<artifactId>bookkeeper-admin-parent</artifactId>
<version>0.0.1</version>
<packaging>pom</packaging>

<modules>
<module>bookkeeper-admin-jdk</module>
</modules>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -15,19 +20,20 @@
<src.dir>src/main/java</src.dir>
<!-- dependency -->
<embedded-bookkeeper.version>0.0.1</embedded-bookkeeper.version>
<jackson.version>2.14.2</jackson.version>
<junit.version>5.9.2</junit.version>
<jackson.version>2.17.2</jackson.version>
<junit.version>5.11.0</junit.version>
<log4j.version>2.20.0</log4j.version>
<!-- plugin -->
<compiler-plugin.version>3.10.1</compiler-plugin.version>
<checkstyle-plugin.version>3.2.0</checkstyle-plugin.version>
<javadoc-plugin.version>3.4.1</javadoc-plugin.version>
<lombok.version>1.18.26</lombok.version>
<puppycrawl.version>10.9.3</puppycrawl.version>
<lombok.version>1.18.34</lombok.version>
<puppycrawl.version>10.18.0</puppycrawl.version>
<release-plugin.version>3.0.0-M6</release-plugin.version>
<scm-provider-gitexe.version>2.0.0</scm-provider-gitexe.version>
<scm-provider-gitexe.version>2.1.0</scm-provider-gitexe.version>
<source-plugin.version>3.2.1</source-plugin.version>
<spotbugs-maven-plugin.version>4.7.2.0</spotbugs-maven-plugin.version>
<spotless-maven-plugi.version>2.43.0</spotless-maven-plugi.version>
<surefire-plugin.version>3.0.0-M9</surefire-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
</properties>
Expand Down Expand Up @@ -121,6 +127,25 @@
<useFile>false</useFile>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugi.version}</version>
<configuration>
<java>
<importOrder>
<order>,java,static others</order>
</importOrder>
<removeUnusedImports/>
<trimTrailingWhitespace/>
<endWithNewline/>
<indent>
<spaces>true</spaces>
<spacesPerTab>4</spacesPerTab>
</indent>
</java>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down

0 comments on commit 63a2a3a

Please sign in to comment.