diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml index 824f983..13e0c77 100644 --- a/.github/workflows/develop.yaml +++ b/.github/workflows/develop.yaml @@ -22,7 +22,7 @@ jobs: java-version: '17' distribution: 'temurin' - name: Cache Maven packages - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} @@ -60,12 +60,14 @@ jobs: distribution: 'temurin' - name: Cache Maven packages - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 + + - name: Set up Maven settings.xml run: | mkdir -p ~/.m2 @@ -85,6 +87,37 @@ jobs: + + pmdCheck: + needs: build + name: Run code analyser PMD + runs-on: ubuntu-latest + steps: + - name: Clone webank online banking repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + architecture: x64 + distribution: 'temurin' + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + + + - name: build project before check + run: mvn -ntp -DskipTests -DskipITs -Dmaven.javadoc.skip=true clean install + + - name: Check pmd + run: mvn -ntp pmd:check + + security-scan: name: Owasp security scan runs-on: ubuntu-latest diff --git a/obs/obs-service-impl/src/main/java/com/adorsys/webank/obs/serviceimpl/OBSServiceImpl.java b/obs/obs-service-impl/src/main/java/com/adorsys/webank/obs/serviceimpl/OBSServiceImpl.java index 57c7864..b3ce30a 100644 --- a/obs/obs-service-impl/src/main/java/com/adorsys/webank/obs/serviceimpl/OBSServiceImpl.java +++ b/obs/obs-service-impl/src/main/java/com/adorsys/webank/obs/serviceimpl/OBSServiceImpl.java @@ -65,7 +65,6 @@ public String registerAccount(RegistrationRequest registrationRequest) { return "Error creating account for phone number: " + registrationRequest.getPhoneNumber(); } } catch (Exception e) { - System.err.println("Exception occurred during account registration: " + e); return "An error occurred while processing the request: " + e.getMessage(); } } diff --git a/online-banking-app/pom.xml b/online-banking-app/pom.xml index 5c6f59c..91d29d3 100644 --- a/online-banking-app/pom.xml +++ b/online-banking-app/pom.xml @@ -28,6 +28,7 @@ 17 2023.0.3 + ../ diff --git a/online-banking-app/src/main/java/com/adorsys/webank/Config/WebConfig.java b/online-banking-app/src/main/java/com/adorsys/webank/config/WebConfig.java similarity index 96% rename from online-banking-app/src/main/java/com/adorsys/webank/Config/WebConfig.java rename to online-banking-app/src/main/java/com/adorsys/webank/config/WebConfig.java index 13ddb72..9d6940c 100644 --- a/online-banking-app/src/main/java/com/adorsys/webank/Config/WebConfig.java +++ b/online-banking-app/src/main/java/com/adorsys/webank/config/WebConfig.java @@ -1,4 +1,4 @@ -package com.adorsys.webank.Config; +package com.adorsys.webank.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/pom.xml b/pom.xml index f0f7620..7c08442 100644 --- a/pom.xml +++ b/pom.xml @@ -12,6 +12,66 @@ online-banking-app + Webank + OpenSource Implementation Of Online banking Functionalities + + + + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + + Francis Pouatcha + francis.pouatcha@adorsys.com + adorsys GmbH & Co KG + https://adorsys.de/ + + + Nancy Muyeh + nancy.muyeh@adorsys.com + adorsys GmbH & Co KG + https://adorsys.de/ + + + Chia Hans Ful + hans.chia@adorsys.com + adorsys GmbH & Co KG + https://adorsys.de/ + + + Nkwa Jude Tambe + jude.nkwa@adorsys.com + adorsys GmbH & Co KG + https://adorsys.de/ + + + Ariel Tchikaya + ariel.tchikaya@adorsys.com + adorsys GmbH & Co KG + https://adorsys.de/ + + + + Koufan De Koufan Menkene + menkene.koufan@adorsys.com + adorsys GmbH & Co KG + https://adorsys.de/ + + + Yvan Henang + yvan.henang@skyengpro.com + SKY ENGINEERING PROFESSIONAL Sarl + https://skyengpro.de/ + + + + + @@ -449,7 +509,43 @@ + + + org.apache.maven.plugins + maven-pmd-plugin + ${maven-pmd-plugin.version} + + 100 + ${java.version} + true + false + + ${ruleset.basedir}/qa/pmd/pmd-ruleset.xml + + true + true + true + + **/*MapperImpl.java + + + ../ledgers-deposit-account-service-impl/target/generated-sources/annotations/ + + ../ledgers-middleware-rest-server/target/generated-sources/annotations/ + + ../ledgers-middleware-service-impl/target/generated-sources/annotations/ + + ../ledgers-postings-service-impl/target/generated-sources/annotations/ + + ../ledgers-sca-service-impl/target/generated-sources/annotations/ + + ../ledgers-user-management-service-impl/target/generated-sources/annotations/ + + + + + - + \ No newline at end of file diff --git a/qa/pmd/pmd-ruleset.xml b/qa/pmd/pmd-ruleset.xml new file mode 100644 index 0000000..1c724c0 --- /dev/null +++ b/qa/pmd/pmd-ruleset.xml @@ -0,0 +1,135 @@ + + + + + + + This ruleset defines the PMD rules for webank-online-banking project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file