From 66fd9e760cec52b6b2ba3fe3752bb84806a6d8dd Mon Sep 17 00:00:00 2001 From: CodingClem <50382080+ClementGib@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:15:51 +0100 Subject: [PATCH 1/2] task#44: set project in in root folder for mvn build and test --- .../.dockerignore => .dockerignore | 0 .github/workflows/maven.yml | 36 +++++++++ .gitignore | 54 ++++++++++++- README.md | 8 +- .../application => application}/pom.xml | 0 .../src/main/docker/Dockerfile.jvm | 0 .../src/main/docker/Dockerfile.legacy-jar | 0 .../src/main/docker/Dockerfile.native | 0 .../src/main/docker/Dockerfile.native-micro | 0 .../bank/account/BankAccountEntity.java | 0 .../bank/account/BankAccountMapper.java | 0 .../bank/account/BankAccountRepository.java | 0 .../bank/account/BankAccountServiceImpl.java | 0 .../application/customer/CustomerEntity.java | 0 .../application/customer/CustomerMapper.java | 0 .../customer/CustomerRepository.java | 0 .../application/customer/GenderConverter.java | 0 .../customer/MaritalStatusConverter.java | 0 .../application/mapper/DtoEntityMapper.java | 0 .../bas/application/scheduler/Scheduler.java | 0 .../application/scheduler/SchedulerImpl.java | 0 .../transaction/TransactionEntity.java | 0 .../transaction/TransactionMapper.java | 0 .../transaction/TransactionRepository.java | 0 .../transaction/TransactionServiceImpl.java | 0 .../src/main/resources/application.properties | 0 .../bank/account/BankAccountMapperTest.java | 0 .../account/BankAccountRepositoryTest.java | 0 .../bank/account/BankAccountServiceTest.java | 0 .../bank/scheduler/SchedulerTest.java | 0 .../bank/scheduler/SchedulerTestProfile.java | 0 .../transaction/TransactionMapperTest.java | 0 .../transaction/TransactionServiceTest.java | 0 .../customer/CustomerMapperTest.java | 0 .../customer/CustomerRepositoryTest.java | 0 .../customer/GenderConverterTest.java | 0 .../customer/MaritalStatusConverterTest.java | 0 .../TransactionRepositoryTest.java | 0 .../client => client}/.attach_pid8719 | 0 {quarkus-backend/client => client}/pom.xml | 0 .../bank/account/BankAccountResource.java | 0 .../bas/client/customer/CustomerResource.java | 0 .../transaction/TransactionResource.java | 0 .../src/main/resources/application.properties | 0 .../client/customer/CustomerResourceTest.java | 0 .../transaction/TransactionResourceTest.java | 0 {quarkus-backend/domain => domain}/pom.xml | 0 .../bas/domain/bank/account/AccountType.java | 0 .../bas/domain/bank/account/BankAccount.java | 0 .../account/BankAccountControllerPort.java | 0 .../bank/account/BankAccountException.java | 0 .../account/BankAccountPersistencePort.java | 0 .../bank/account/BankAccountServicePort.java | 0 .../bank/account/BankAccountValidator.java | 0 .../account/checking/CheckingBankAccount.java | 0 .../bank/account/mma/MMABankAccount.java | 0 .../account/saving/SavingBankAccount.java | 0 .../com/cdx/bas/domain/customer/Customer.java | 0 .../customer/CustomerPersistencePort.java | 0 .../com/cdx/bas/domain/customer/Gender.java | 0 .../bas/domain/customer/MaritalStatus.java | 0 .../bas/domain/error/CurrencyException.java | 0 .../java/com/cdx/bas/domain/money/Amount.java | 0 .../cdx/bas/domain/money/AmountValidator.java | 0 .../java/com/cdx/bas/domain/money/Money.java | 0 .../bas/domain/transaction/Transaction.java | 0 .../TransactionControllerPort.java | 0 .../transaction/TransactionException.java | 0 .../TransactionPersistencePort.java | 0 .../transaction/TransactionServicePort.java | 0 .../domain/transaction/TransactionStatus.java | 0 .../domain/transaction/TransactionType.java | 0 .../bas/domain/utils/BankAccountFactory.java | 0 .../bas/domain/utils/ExchangeRateUtils.java | 0 .../domain/validator/CurrencyValidator.java | 0 .../bas/domain/validator/ValidCurrency.java | 0 .../bank/account/BankAccountFactoryTest.java | 0 .../account/BankAccountValidatorTest.java | 0 .../bank/money/AmountValidatorTest.java | 0 .../cdx/bas/domain/bank/money/MoneyTest.java | 0 .../bank/utils/ExchangeRateUtilsTest.java | 0 .../env => env}/docker-compose.yaml | 0 {quarkus-backend/env => env}/init-pg.sql | 0 {quarkus-backend/env => env}/insert-pg.sql | 0 .../env => env}/quarkus-realm.json | 0 {quarkus-backend/env => env}/servers.json | 0 .../test-resources/init-test-h2.sql | 0 .../test-resources/insert-test-h2.sql | 0 quarkus-backend/mvnw => mvnw | 0 quarkus-backend/mvnw.cmd => mvnw.cmd | 0 quarkus-backend/pom.xml => pom.xml | 0 quarkus-backend/.gitignore | 45 ----------- quarkus-backend/.mvn/wrapper/.gitignore | 1 - .../.mvn/wrapper/maven-wrapper.properties | 20 ----- quarkus-backend/README.md | 81 ------------------- 95 files changed, 90 insertions(+), 155 deletions(-) rename quarkus-backend/.dockerignore => .dockerignore (100%) create mode 100644 .github/workflows/maven.yml rename {quarkus-backend/application => application}/pom.xml (100%) rename {quarkus-backend/application => application}/src/main/docker/Dockerfile.jvm (100%) rename {quarkus-backend/application => application}/src/main/docker/Dockerfile.legacy-jar (100%) rename {quarkus-backend/application => application}/src/main/docker/Dockerfile.native (100%) rename {quarkus-backend/application => application}/src/main/docker/Dockerfile.native-micro (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/bank/account/BankAccountEntity.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/bank/account/BankAccountMapper.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/bank/account/BankAccountRepository.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/bank/account/BankAccountServiceImpl.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/customer/CustomerEntity.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/customer/CustomerMapper.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/customer/CustomerRepository.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/customer/GenderConverter.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/customer/MaritalStatusConverter.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/mapper/DtoEntityMapper.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/scheduler/Scheduler.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/scheduler/SchedulerImpl.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/transaction/TransactionEntity.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/transaction/TransactionMapper.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/transaction/TransactionRepository.java (100%) rename {quarkus-backend/application => application}/src/main/java/com/cdx/bas/application/transaction/TransactionServiceImpl.java (100%) rename {quarkus-backend/application => application}/src/main/resources/application.properties (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/bank/account/BankAccountMapperTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/bank/account/BankAccountRepositoryTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/bank/account/BankAccountServiceTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTestProfile.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/bank/transaction/TransactionMapperTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/bank/transaction/TransactionServiceTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/customer/CustomerMapperTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/customer/CustomerRepositoryTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/customer/GenderConverterTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/customer/MaritalStatusConverterTest.java (100%) rename {quarkus-backend/application => application}/src/test/java/com/cdx/bas/application/transaction/TransactionRepositoryTest.java (100%) rename {quarkus-backend/client => client}/.attach_pid8719 (100%) rename {quarkus-backend/client => client}/pom.xml (100%) rename {quarkus-backend/client => client}/src/main/java/com/cdx/bas/client/bank/account/BankAccountResource.java (100%) rename {quarkus-backend/client => client}/src/main/java/com/cdx/bas/client/customer/CustomerResource.java (100%) rename {quarkus-backend/client => client}/src/main/java/com/cdx/bas/client/transaction/TransactionResource.java (100%) rename {quarkus-backend/client => client}/src/main/resources/application.properties (100%) rename {quarkus-backend/client => client}/src/test/java/com/cdx/bas/client/customer/CustomerResourceTest.java (100%) rename {quarkus-backend/client => client}/src/test/java/com/cdx/bas/client/transaction/TransactionResourceTest.java (100%) rename {quarkus-backend/domain => domain}/pom.xml (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/AccountType.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/BankAccount.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/BankAccountControllerPort.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/BankAccountException.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/BankAccountPersistencePort.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/BankAccountServicePort.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/BankAccountValidator.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/checking/CheckingBankAccount.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/mma/MMABankAccount.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/bank/account/saving/SavingBankAccount.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/customer/Customer.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/customer/CustomerPersistencePort.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/customer/Gender.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/customer/MaritalStatus.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/error/CurrencyException.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/money/Amount.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/money/AmountValidator.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/money/Money.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/transaction/Transaction.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/transaction/TransactionControllerPort.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/transaction/TransactionException.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/transaction/TransactionPersistencePort.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/transaction/TransactionServicePort.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/transaction/TransactionStatus.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/transaction/TransactionType.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/utils/BankAccountFactory.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/utils/ExchangeRateUtils.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/validator/CurrencyValidator.java (100%) rename {quarkus-backend/domain => domain}/src/main/java/com/cdx/bas/domain/validator/ValidCurrency.java (100%) rename {quarkus-backend/domain => domain}/src/test/java/com/cdx/bas/domain/bank/account/BankAccountFactoryTest.java (100%) rename {quarkus-backend/domain => domain}/src/test/java/com/cdx/bas/domain/bank/account/BankAccountValidatorTest.java (100%) rename {quarkus-backend/domain => domain}/src/test/java/com/cdx/bas/domain/bank/money/AmountValidatorTest.java (100%) rename {quarkus-backend/domain => domain}/src/test/java/com/cdx/bas/domain/bank/money/MoneyTest.java (100%) rename {quarkus-backend/domain => domain}/src/test/java/com/cdx/bas/domain/bank/utils/ExchangeRateUtilsTest.java (100%) rename {quarkus-backend/env => env}/docker-compose.yaml (100%) rename {quarkus-backend/env => env}/init-pg.sql (100%) rename {quarkus-backend/env => env}/insert-pg.sql (100%) rename {quarkus-backend/env => env}/quarkus-realm.json (100%) rename {quarkus-backend/env => env}/servers.json (100%) rename {quarkus-backend/env => env}/test-resources/init-test-h2.sql (100%) rename {quarkus-backend/env => env}/test-resources/insert-test-h2.sql (100%) rename quarkus-backend/mvnw => mvnw (100%) rename quarkus-backend/mvnw.cmd => mvnw.cmd (100%) rename quarkus-backend/pom.xml => pom.xml (100%) delete mode 100644 quarkus-backend/.gitignore delete mode 100644 quarkus-backend/.mvn/wrapper/.gitignore delete mode 100644 quarkus-backend/.mvn/wrapper/maven-wrapper.properties delete mode 100644 quarkus-backend/README.md diff --git a/quarkus-backend/.dockerignore b/.dockerignore similarity index 100% rename from quarkus-backend/.dockerignore rename to .dockerignore diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 00000000..e1a86969 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,36 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java CI with Maven + +on: + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + java-version: '21' + distribution: 'temurin' + architecture: x64 + cache: maven + - name: Build with Maven and tests + run: mvn -B package --file pom.xml + + # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive + - name: Update dependency graph + uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 diff --git a/.gitignore b/.gitignore index 1e61f44f..15705b01 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,56 @@ +#Maven +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +release.properties +.flattened-pom.xml +.mvn +.mvn/* out/ -.idea/ +maven-wrapper.jar + + +# Eclipse +.project +.classpath +.settings/ +bin/ + +# IntelliJ +.idea .idea_modules/ -*.iml *.ipr +*.iml *.iws -.mvn +# NetBeans +nb-configuration.xml + +# Visual Studio Code +.vscode +.factorypath + +# OSX +.DS_Store + +# Vim +*.swp +*.swo + +# patch +*.orig +*.rej + +# Local environment +.env + +# Docker +env/data/ + +# Other +compose/data/ + + + -quarkus-backend/compose/data/ diff --git a/README.md b/README.md index 283eeb67..b3f4b49b 100644 --- a/README.md +++ b/README.md @@ -120,14 +120,14 @@ I want to see the history (operation, date, amount, balance) of my operations 1. Lancer les containers (PostgreSQL, PgAdmin, KeyClock) 🐘🐋 -*Dans le répertoire `quarkus-backend/compose`* +*Dans le répertoire `compose`* ```bash docker-compose up ``` -2. Lancer le back-end Quarkus +1. Lancer le back-end Quarkus -*Dans le répertoire `quarkus-backend`* +*A la racine du projet* ```bash quarkus dev -e #OU @@ -136,7 +136,7 @@ quarkus dev -e 3. (Optionel) Lancer les tests Junit 5 -*Dans le répertoire `quarkus-backend`* +*A la racine du projet* ```bash mvn test ``` diff --git a/quarkus-backend/application/pom.xml b/application/pom.xml similarity index 100% rename from quarkus-backend/application/pom.xml rename to application/pom.xml diff --git a/quarkus-backend/application/src/main/docker/Dockerfile.jvm b/application/src/main/docker/Dockerfile.jvm similarity index 100% rename from quarkus-backend/application/src/main/docker/Dockerfile.jvm rename to application/src/main/docker/Dockerfile.jvm diff --git a/quarkus-backend/application/src/main/docker/Dockerfile.legacy-jar b/application/src/main/docker/Dockerfile.legacy-jar similarity index 100% rename from quarkus-backend/application/src/main/docker/Dockerfile.legacy-jar rename to application/src/main/docker/Dockerfile.legacy-jar diff --git a/quarkus-backend/application/src/main/docker/Dockerfile.native b/application/src/main/docker/Dockerfile.native similarity index 100% rename from quarkus-backend/application/src/main/docker/Dockerfile.native rename to application/src/main/docker/Dockerfile.native diff --git a/quarkus-backend/application/src/main/docker/Dockerfile.native-micro b/application/src/main/docker/Dockerfile.native-micro similarity index 100% rename from quarkus-backend/application/src/main/docker/Dockerfile.native-micro rename to application/src/main/docker/Dockerfile.native-micro diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountEntity.java b/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountEntity.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountEntity.java rename to application/src/main/java/com/cdx/bas/application/bank/account/BankAccountEntity.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountMapper.java b/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountMapper.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountMapper.java rename to application/src/main/java/com/cdx/bas/application/bank/account/BankAccountMapper.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountRepository.java b/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountRepository.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountRepository.java rename to application/src/main/java/com/cdx/bas/application/bank/account/BankAccountRepository.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountServiceImpl.java b/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountServiceImpl.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/bank/account/BankAccountServiceImpl.java rename to application/src/main/java/com/cdx/bas/application/bank/account/BankAccountServiceImpl.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/CustomerEntity.java b/application/src/main/java/com/cdx/bas/application/customer/CustomerEntity.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/CustomerEntity.java rename to application/src/main/java/com/cdx/bas/application/customer/CustomerEntity.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/CustomerMapper.java b/application/src/main/java/com/cdx/bas/application/customer/CustomerMapper.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/CustomerMapper.java rename to application/src/main/java/com/cdx/bas/application/customer/CustomerMapper.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/CustomerRepository.java b/application/src/main/java/com/cdx/bas/application/customer/CustomerRepository.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/CustomerRepository.java rename to application/src/main/java/com/cdx/bas/application/customer/CustomerRepository.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/GenderConverter.java b/application/src/main/java/com/cdx/bas/application/customer/GenderConverter.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/GenderConverter.java rename to application/src/main/java/com/cdx/bas/application/customer/GenderConverter.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/MaritalStatusConverter.java b/application/src/main/java/com/cdx/bas/application/customer/MaritalStatusConverter.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/customer/MaritalStatusConverter.java rename to application/src/main/java/com/cdx/bas/application/customer/MaritalStatusConverter.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/mapper/DtoEntityMapper.java b/application/src/main/java/com/cdx/bas/application/mapper/DtoEntityMapper.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/mapper/DtoEntityMapper.java rename to application/src/main/java/com/cdx/bas/application/mapper/DtoEntityMapper.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/scheduler/Scheduler.java b/application/src/main/java/com/cdx/bas/application/scheduler/Scheduler.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/scheduler/Scheduler.java rename to application/src/main/java/com/cdx/bas/application/scheduler/Scheduler.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/scheduler/SchedulerImpl.java b/application/src/main/java/com/cdx/bas/application/scheduler/SchedulerImpl.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/scheduler/SchedulerImpl.java rename to application/src/main/java/com/cdx/bas/application/scheduler/SchedulerImpl.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/transaction/TransactionEntity.java b/application/src/main/java/com/cdx/bas/application/transaction/TransactionEntity.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/transaction/TransactionEntity.java rename to application/src/main/java/com/cdx/bas/application/transaction/TransactionEntity.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/transaction/TransactionMapper.java b/application/src/main/java/com/cdx/bas/application/transaction/TransactionMapper.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/transaction/TransactionMapper.java rename to application/src/main/java/com/cdx/bas/application/transaction/TransactionMapper.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/transaction/TransactionRepository.java b/application/src/main/java/com/cdx/bas/application/transaction/TransactionRepository.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/transaction/TransactionRepository.java rename to application/src/main/java/com/cdx/bas/application/transaction/TransactionRepository.java diff --git a/quarkus-backend/application/src/main/java/com/cdx/bas/application/transaction/TransactionServiceImpl.java b/application/src/main/java/com/cdx/bas/application/transaction/TransactionServiceImpl.java similarity index 100% rename from quarkus-backend/application/src/main/java/com/cdx/bas/application/transaction/TransactionServiceImpl.java rename to application/src/main/java/com/cdx/bas/application/transaction/TransactionServiceImpl.java diff --git a/quarkus-backend/application/src/main/resources/application.properties b/application/src/main/resources/application.properties similarity index 100% rename from quarkus-backend/application/src/main/resources/application.properties rename to application/src/main/resources/application.properties diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/account/BankAccountMapperTest.java b/application/src/test/java/com/cdx/bas/application/bank/account/BankAccountMapperTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/account/BankAccountMapperTest.java rename to application/src/test/java/com/cdx/bas/application/bank/account/BankAccountMapperTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/account/BankAccountRepositoryTest.java b/application/src/test/java/com/cdx/bas/application/bank/account/BankAccountRepositoryTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/account/BankAccountRepositoryTest.java rename to application/src/test/java/com/cdx/bas/application/bank/account/BankAccountRepositoryTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/account/BankAccountServiceTest.java b/application/src/test/java/com/cdx/bas/application/bank/account/BankAccountServiceTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/account/BankAccountServiceTest.java rename to application/src/test/java/com/cdx/bas/application/bank/account/BankAccountServiceTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTest.java b/application/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTest.java rename to application/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTestProfile.java b/application/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTestProfile.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTestProfile.java rename to application/src/test/java/com/cdx/bas/application/bank/scheduler/SchedulerTestProfile.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/transaction/TransactionMapperTest.java b/application/src/test/java/com/cdx/bas/application/bank/transaction/TransactionMapperTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/transaction/TransactionMapperTest.java rename to application/src/test/java/com/cdx/bas/application/bank/transaction/TransactionMapperTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/transaction/TransactionServiceTest.java b/application/src/test/java/com/cdx/bas/application/bank/transaction/TransactionServiceTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/bank/transaction/TransactionServiceTest.java rename to application/src/test/java/com/cdx/bas/application/bank/transaction/TransactionServiceTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/customer/CustomerMapperTest.java b/application/src/test/java/com/cdx/bas/application/customer/CustomerMapperTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/customer/CustomerMapperTest.java rename to application/src/test/java/com/cdx/bas/application/customer/CustomerMapperTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/customer/CustomerRepositoryTest.java b/application/src/test/java/com/cdx/bas/application/customer/CustomerRepositoryTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/customer/CustomerRepositoryTest.java rename to application/src/test/java/com/cdx/bas/application/customer/CustomerRepositoryTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/customer/GenderConverterTest.java b/application/src/test/java/com/cdx/bas/application/customer/GenderConverterTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/customer/GenderConverterTest.java rename to application/src/test/java/com/cdx/bas/application/customer/GenderConverterTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/customer/MaritalStatusConverterTest.java b/application/src/test/java/com/cdx/bas/application/customer/MaritalStatusConverterTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/customer/MaritalStatusConverterTest.java rename to application/src/test/java/com/cdx/bas/application/customer/MaritalStatusConverterTest.java diff --git a/quarkus-backend/application/src/test/java/com/cdx/bas/application/transaction/TransactionRepositoryTest.java b/application/src/test/java/com/cdx/bas/application/transaction/TransactionRepositoryTest.java similarity index 100% rename from quarkus-backend/application/src/test/java/com/cdx/bas/application/transaction/TransactionRepositoryTest.java rename to application/src/test/java/com/cdx/bas/application/transaction/TransactionRepositoryTest.java diff --git a/quarkus-backend/client/.attach_pid8719 b/client/.attach_pid8719 similarity index 100% rename from quarkus-backend/client/.attach_pid8719 rename to client/.attach_pid8719 diff --git a/quarkus-backend/client/pom.xml b/client/pom.xml similarity index 100% rename from quarkus-backend/client/pom.xml rename to client/pom.xml diff --git a/quarkus-backend/client/src/main/java/com/cdx/bas/client/bank/account/BankAccountResource.java b/client/src/main/java/com/cdx/bas/client/bank/account/BankAccountResource.java similarity index 100% rename from quarkus-backend/client/src/main/java/com/cdx/bas/client/bank/account/BankAccountResource.java rename to client/src/main/java/com/cdx/bas/client/bank/account/BankAccountResource.java diff --git a/quarkus-backend/client/src/main/java/com/cdx/bas/client/customer/CustomerResource.java b/client/src/main/java/com/cdx/bas/client/customer/CustomerResource.java similarity index 100% rename from quarkus-backend/client/src/main/java/com/cdx/bas/client/customer/CustomerResource.java rename to client/src/main/java/com/cdx/bas/client/customer/CustomerResource.java diff --git a/quarkus-backend/client/src/main/java/com/cdx/bas/client/transaction/TransactionResource.java b/client/src/main/java/com/cdx/bas/client/transaction/TransactionResource.java similarity index 100% rename from quarkus-backend/client/src/main/java/com/cdx/bas/client/transaction/TransactionResource.java rename to client/src/main/java/com/cdx/bas/client/transaction/TransactionResource.java diff --git a/quarkus-backend/client/src/main/resources/application.properties b/client/src/main/resources/application.properties similarity index 100% rename from quarkus-backend/client/src/main/resources/application.properties rename to client/src/main/resources/application.properties diff --git a/quarkus-backend/client/src/test/java/com/cdx/bas/client/customer/CustomerResourceTest.java b/client/src/test/java/com/cdx/bas/client/customer/CustomerResourceTest.java similarity index 100% rename from quarkus-backend/client/src/test/java/com/cdx/bas/client/customer/CustomerResourceTest.java rename to client/src/test/java/com/cdx/bas/client/customer/CustomerResourceTest.java diff --git a/quarkus-backend/client/src/test/java/com/cdx/bas/client/transaction/TransactionResourceTest.java b/client/src/test/java/com/cdx/bas/client/transaction/TransactionResourceTest.java similarity index 100% rename from quarkus-backend/client/src/test/java/com/cdx/bas/client/transaction/TransactionResourceTest.java rename to client/src/test/java/com/cdx/bas/client/transaction/TransactionResourceTest.java diff --git a/quarkus-backend/domain/pom.xml b/domain/pom.xml similarity index 100% rename from quarkus-backend/domain/pom.xml rename to domain/pom.xml diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/AccountType.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/AccountType.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/AccountType.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/AccountType.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccount.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccount.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccount.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccount.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountControllerPort.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountControllerPort.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountControllerPort.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountControllerPort.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountException.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountException.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountException.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountException.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountPersistencePort.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountPersistencePort.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountPersistencePort.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountPersistencePort.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountServicePort.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountServicePort.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountServicePort.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountServicePort.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountValidator.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountValidator.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountValidator.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/BankAccountValidator.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/checking/CheckingBankAccount.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/checking/CheckingBankAccount.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/checking/CheckingBankAccount.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/checking/CheckingBankAccount.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/mma/MMABankAccount.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/mma/MMABankAccount.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/mma/MMABankAccount.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/mma/MMABankAccount.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/saving/SavingBankAccount.java b/domain/src/main/java/com/cdx/bas/domain/bank/account/saving/SavingBankAccount.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/bank/account/saving/SavingBankAccount.java rename to domain/src/main/java/com/cdx/bas/domain/bank/account/saving/SavingBankAccount.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/customer/Customer.java b/domain/src/main/java/com/cdx/bas/domain/customer/Customer.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/customer/Customer.java rename to domain/src/main/java/com/cdx/bas/domain/customer/Customer.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/customer/CustomerPersistencePort.java b/domain/src/main/java/com/cdx/bas/domain/customer/CustomerPersistencePort.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/customer/CustomerPersistencePort.java rename to domain/src/main/java/com/cdx/bas/domain/customer/CustomerPersistencePort.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/customer/Gender.java b/domain/src/main/java/com/cdx/bas/domain/customer/Gender.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/customer/Gender.java rename to domain/src/main/java/com/cdx/bas/domain/customer/Gender.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/customer/MaritalStatus.java b/domain/src/main/java/com/cdx/bas/domain/customer/MaritalStatus.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/customer/MaritalStatus.java rename to domain/src/main/java/com/cdx/bas/domain/customer/MaritalStatus.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/error/CurrencyException.java b/domain/src/main/java/com/cdx/bas/domain/error/CurrencyException.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/error/CurrencyException.java rename to domain/src/main/java/com/cdx/bas/domain/error/CurrencyException.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/money/Amount.java b/domain/src/main/java/com/cdx/bas/domain/money/Amount.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/money/Amount.java rename to domain/src/main/java/com/cdx/bas/domain/money/Amount.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/money/AmountValidator.java b/domain/src/main/java/com/cdx/bas/domain/money/AmountValidator.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/money/AmountValidator.java rename to domain/src/main/java/com/cdx/bas/domain/money/AmountValidator.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/money/Money.java b/domain/src/main/java/com/cdx/bas/domain/money/Money.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/money/Money.java rename to domain/src/main/java/com/cdx/bas/domain/money/Money.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/Transaction.java b/domain/src/main/java/com/cdx/bas/domain/transaction/Transaction.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/Transaction.java rename to domain/src/main/java/com/cdx/bas/domain/transaction/Transaction.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionControllerPort.java b/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionControllerPort.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionControllerPort.java rename to domain/src/main/java/com/cdx/bas/domain/transaction/TransactionControllerPort.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionException.java b/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionException.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionException.java rename to domain/src/main/java/com/cdx/bas/domain/transaction/TransactionException.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionPersistencePort.java b/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionPersistencePort.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionPersistencePort.java rename to domain/src/main/java/com/cdx/bas/domain/transaction/TransactionPersistencePort.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionServicePort.java b/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionServicePort.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionServicePort.java rename to domain/src/main/java/com/cdx/bas/domain/transaction/TransactionServicePort.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionStatus.java b/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionStatus.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionStatus.java rename to domain/src/main/java/com/cdx/bas/domain/transaction/TransactionStatus.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionType.java b/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionType.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/transaction/TransactionType.java rename to domain/src/main/java/com/cdx/bas/domain/transaction/TransactionType.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/utils/BankAccountFactory.java b/domain/src/main/java/com/cdx/bas/domain/utils/BankAccountFactory.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/utils/BankAccountFactory.java rename to domain/src/main/java/com/cdx/bas/domain/utils/BankAccountFactory.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/utils/ExchangeRateUtils.java b/domain/src/main/java/com/cdx/bas/domain/utils/ExchangeRateUtils.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/utils/ExchangeRateUtils.java rename to domain/src/main/java/com/cdx/bas/domain/utils/ExchangeRateUtils.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/validator/CurrencyValidator.java b/domain/src/main/java/com/cdx/bas/domain/validator/CurrencyValidator.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/validator/CurrencyValidator.java rename to domain/src/main/java/com/cdx/bas/domain/validator/CurrencyValidator.java diff --git a/quarkus-backend/domain/src/main/java/com/cdx/bas/domain/validator/ValidCurrency.java b/domain/src/main/java/com/cdx/bas/domain/validator/ValidCurrency.java similarity index 100% rename from quarkus-backend/domain/src/main/java/com/cdx/bas/domain/validator/ValidCurrency.java rename to domain/src/main/java/com/cdx/bas/domain/validator/ValidCurrency.java diff --git a/quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/account/BankAccountFactoryTest.java b/domain/src/test/java/com/cdx/bas/domain/bank/account/BankAccountFactoryTest.java similarity index 100% rename from quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/account/BankAccountFactoryTest.java rename to domain/src/test/java/com/cdx/bas/domain/bank/account/BankAccountFactoryTest.java diff --git a/quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/account/BankAccountValidatorTest.java b/domain/src/test/java/com/cdx/bas/domain/bank/account/BankAccountValidatorTest.java similarity index 100% rename from quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/account/BankAccountValidatorTest.java rename to domain/src/test/java/com/cdx/bas/domain/bank/account/BankAccountValidatorTest.java diff --git a/quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/money/AmountValidatorTest.java b/domain/src/test/java/com/cdx/bas/domain/bank/money/AmountValidatorTest.java similarity index 100% rename from quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/money/AmountValidatorTest.java rename to domain/src/test/java/com/cdx/bas/domain/bank/money/AmountValidatorTest.java diff --git a/quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/money/MoneyTest.java b/domain/src/test/java/com/cdx/bas/domain/bank/money/MoneyTest.java similarity index 100% rename from quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/money/MoneyTest.java rename to domain/src/test/java/com/cdx/bas/domain/bank/money/MoneyTest.java diff --git a/quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/utils/ExchangeRateUtilsTest.java b/domain/src/test/java/com/cdx/bas/domain/bank/utils/ExchangeRateUtilsTest.java similarity index 100% rename from quarkus-backend/domain/src/test/java/com/cdx/bas/domain/bank/utils/ExchangeRateUtilsTest.java rename to domain/src/test/java/com/cdx/bas/domain/bank/utils/ExchangeRateUtilsTest.java diff --git a/quarkus-backend/env/docker-compose.yaml b/env/docker-compose.yaml similarity index 100% rename from quarkus-backend/env/docker-compose.yaml rename to env/docker-compose.yaml diff --git a/quarkus-backend/env/init-pg.sql b/env/init-pg.sql similarity index 100% rename from quarkus-backend/env/init-pg.sql rename to env/init-pg.sql diff --git a/quarkus-backend/env/insert-pg.sql b/env/insert-pg.sql similarity index 100% rename from quarkus-backend/env/insert-pg.sql rename to env/insert-pg.sql diff --git a/quarkus-backend/env/quarkus-realm.json b/env/quarkus-realm.json similarity index 100% rename from quarkus-backend/env/quarkus-realm.json rename to env/quarkus-realm.json diff --git a/quarkus-backend/env/servers.json b/env/servers.json similarity index 100% rename from quarkus-backend/env/servers.json rename to env/servers.json diff --git a/quarkus-backend/env/test-resources/init-test-h2.sql b/env/test-resources/init-test-h2.sql similarity index 100% rename from quarkus-backend/env/test-resources/init-test-h2.sql rename to env/test-resources/init-test-h2.sql diff --git a/quarkus-backend/env/test-resources/insert-test-h2.sql b/env/test-resources/insert-test-h2.sql similarity index 100% rename from quarkus-backend/env/test-resources/insert-test-h2.sql rename to env/test-resources/insert-test-h2.sql diff --git a/quarkus-backend/mvnw b/mvnw similarity index 100% rename from quarkus-backend/mvnw rename to mvnw diff --git a/quarkus-backend/mvnw.cmd b/mvnw.cmd similarity index 100% rename from quarkus-backend/mvnw.cmd rename to mvnw.cmd diff --git a/quarkus-backend/pom.xml b/pom.xml similarity index 100% rename from quarkus-backend/pom.xml rename to pom.xml diff --git a/quarkus-backend/.gitignore b/quarkus-backend/.gitignore deleted file mode 100644 index 0171a858..00000000 --- a/quarkus-backend/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -#Maven -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -release.properties -.flattened-pom.xml -.mvn -.mvn/* - -# Eclipse -.project -.classpath -.settings/ -bin/ - -# IntelliJ -.idea -*.ipr -*.iml -*.iws - -# NetBeans -nb-configuration.xml - -# Visual Studio Code -.vscode -.factorypath - -# OSX -.DS_Store - -# Vim -*.swp -*.swo - -# patch -*.orig -*.rej - -# Local environment -.env - -# Docker -env/data/ diff --git a/quarkus-backend/.mvn/wrapper/.gitignore b/quarkus-backend/.mvn/wrapper/.gitignore deleted file mode 100644 index e72f5e8b..00000000 --- a/quarkus-backend/.mvn/wrapper/.gitignore +++ /dev/null @@ -1 +0,0 @@ -maven-wrapper.jar diff --git a/quarkus-backend/.mvn/wrapper/maven-wrapper.properties b/quarkus-backend/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index d806fd27..00000000 --- a/quarkus-backend/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,20 +0,0 @@ -# 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. -distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip -wrapperUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar -distributionSha256Sum=83aaf914c785c9faed661f223000a92d1de9553f5c82d3b4362e66d9c031625f -wrapperSha256Sum=e63a53cfb9c4d291ebe3c2b0edacb7622bbc480326beaa5a0456e412f52f066a diff --git a/quarkus-backend/README.md b/quarkus-backend/README.md deleted file mode 100644 index 96690595..00000000 --- a/quarkus-backend/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# BankAccountSimulator back-end - -This project uses Quarkus, the Supersonic Subatomic Java Framework. - -If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ . - -## Running the application in dev mode - -You can run your application in dev mode that enables live coding using: -```shell script -./mvnw compile quarkus:dev -``` - -> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/. - -## Packaging and running the application - -The application can be packaged using: -```shell script -./mvnw package -``` -It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory. -Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory. - -The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`. - -If you want to build an _über-jar_, execute the following command: -```shell script -./mvnw package -Dquarkus.package.type=uber-jar -``` - -The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`. - -## Creating a native executable - -You can create a native executable using: -```shell script -./mvnw package -Pnative -``` - -Or, if you don't have GraalVM installed, you can run the native executable build in a container using: -```shell script -./mvnw package -Pnative -Dquarkus.native.container-build=true -``` - -You can then execute your native executable with: `./target/getting-started-1.0.0-SNAPSHOT-runner` - -If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling. - -## Related Guides - -- RESTEasy Reactive ([guide](https://quarkus.io/guides/resteasy-reactive)): A JAX-RS implementation utilizing build time processing and Vert.x. This extension is not compatible with the quarkus-resteasy extension, or any of the extensions that depend on it. - -## Provided Code - -### RESTEasy Reactive - -Easily start your Reactive RESTful Web Services - -[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources) - - -# DETAIL - - -- validation métier: API Bean validation (JSR 303) - - -#### Domain : - -- validation fonctionnelle dès l'initialisation des objets métier -- organisation métier dans le code métier (package by feature) -### Technique - -- Utilisation des records et des constructeurs compact (Java 14) - -### Patterns: - -- Naming unit test : MethodName_ExpectedBehavior_StateUnderTest - - From 89d40f5c8196134acf8ae78314fd80e694b001b7 Mon Sep 17 00:00:00 2001 From: Clement Gibert Date: Sat, 17 Feb 2024 16:17:21 +0100 Subject: [PATCH 2/2] task#44: fix mvnw and .mvn wrapper missing --- .github/workflows/maven.yml | 6 +- .gitignore | 4 - .mvn/wrapper/.gitignore | 1 + .mvn/wrapper/MavenWrapperDownloader.java | 98 ++++++++ .mvn/wrapper/maven-wrapper.properties | 18 ++ README.md | 20 +- .../src/main/resources/application.properties | 1 - client/pom.xml | 5 - .../transaction/TransactionResource.java | 2 - mvnw | 220 +++++++++--------- mvnw.cmd | 33 ++- pom.xml | 7 - 12 files changed, 268 insertions(+), 147 deletions(-) create mode 100644 .mvn/wrapper/.gitignore create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java create mode 100644 .mvn/wrapper/maven-wrapper.properties mode change 100644 => 100755 mvnw.cmd diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index e1a86969..d842010b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -6,7 +6,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Java CI with Maven +name: 'Quarkus CI with Maven' on: push: @@ -30,7 +30,3 @@ jobs: cache: maven - name: Build with Maven and tests run: mvn -B package --file pom.xml - - # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 diff --git a/.gitignore b/.gitignore index 15705b01..e08c7733 100644 --- a/.gitignore +++ b/.gitignore @@ -5,11 +5,7 @@ pom.xml.releaseBackup pom.xml.versionsBackup release.properties .flattened-pom.xml -.mvn -.mvn/* out/ -maven-wrapper.jar - # Eclipse .project diff --git a/.mvn/wrapper/.gitignore b/.mvn/wrapper/.gitignore new file mode 100644 index 00000000..e72f5e8b --- /dev/null +++ b/.mvn/wrapper/.gitignore @@ -0,0 +1 @@ +maven-wrapper.jar diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 00000000..84d1e60d --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,98 @@ +/* + * 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. + */ + +import java.io.IOException; +import java.io.InputStream; +import java.net.Authenticator; +import java.net.PasswordAuthentication; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; + +public final class MavenWrapperDownloader +{ + private static final String WRAPPER_VERSION = "3.2.0"; + + private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) ); + + public static void main( String[] args ) + { + log( "Apache Maven Wrapper Downloader " + WRAPPER_VERSION ); + + if ( args.length != 2 ) + { + System.err.println( " - ERROR wrapperUrl or wrapperJarPath parameter missing" ); + System.exit( 1 ); + } + + try + { + log( " - Downloader started" ); + final URL wrapperUrl = new URL( args[0] ); + final String jarPath = args[1].replace( "..", "" ); // Sanitize path + final Path wrapperJarPath = Paths.get( jarPath ).toAbsolutePath().normalize(); + downloadFileFromURL( wrapperUrl, wrapperJarPath ); + log( "Done" ); + } + catch ( IOException e ) + { + System.err.println( "- Error downloading: " + e.getMessage() ); + if ( VERBOSE ) + { + e.printStackTrace(); + } + System.exit( 1 ); + } + } + + private static void downloadFileFromURL( URL wrapperUrl, Path wrapperJarPath ) + throws IOException + { + log( " - Downloading to: " + wrapperJarPath ); + if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null ) + { + final String username = System.getenv( "MVNW_USERNAME" ); + final char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray(); + Authenticator.setDefault( new Authenticator() + { + @Override + protected PasswordAuthentication getPasswordAuthentication() + { + return new PasswordAuthentication( username, password ); + } + } ); + } + try ( InputStream inStream = wrapperUrl.openStream() ) + { + Files.copy( inStream, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING ); + } + log( " - Downloader complete" ); + } + + private static void log( String msg ) + { + if ( VERBOSE ) + { + System.out.println( msg ); + } + } + +} diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..eacdc9ed --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,18 @@ +# 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. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/README.md b/README.md index b3f4b49b..4556e7df 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,25 @@ quarkus dev -e mvn test ``` - Quarkus HTTP : `localhost:8080` Accéder a pgAdmin via : `localhost:15050` + + + +# DETAIL + +- validation métier: API Bean validation (JSR 303) + +#### Domain : + +- validation fonctionnelle dès l'initialisation des objets métier +- organisation métier dans le code métier (package by feature) + +### Technique + +- Utilisation des records et des constructeurs compact (Java 14) + +### Patterns: + +- Naming unit test : MethodName_ExpectedBehavior_StateUnderTest \ No newline at end of file diff --git a/application/src/main/resources/application.properties b/application/src/main/resources/application.properties index 13da7030..f6183bee 100644 --- a/application/src/main/resources/application.properties +++ b/application/src/main/resources/application.properties @@ -8,7 +8,6 @@ quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:15432/basdb quarkus.hibernate-orm.database.generation=validate quarkus.hibernate-orm.database.default-schema=basapp quarkus.hibernate-orm.jdbc.timezone=Europe/Paris -quarkus.http.host=0.0.0.0 %test.scheduler.activation=false diff --git a/client/pom.xml b/client/pom.xml index cb38d5a9..3e4f41b8 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -18,11 +18,6 @@ com.cdx.bas application - - io.quarkus - quarkus-resteasy - provided - io.quarkus quarkus-smallrye-openapi diff --git a/client/src/main/java/com/cdx/bas/client/transaction/TransactionResource.java b/client/src/main/java/com/cdx/bas/client/transaction/TransactionResource.java index 9f43527d..df0ce86f 100644 --- a/client/src/main/java/com/cdx/bas/client/transaction/TransactionResource.java +++ b/client/src/main/java/com/cdx/bas/client/transaction/TransactionResource.java @@ -1,11 +1,9 @@ package com.cdx.bas.client.transaction; -import com.cdx.bas.application.transaction.TransactionServiceImpl; import com.cdx.bas.domain.transaction.Transaction; import com.cdx.bas.domain.transaction.TransactionControllerPort; import com.cdx.bas.domain.transaction.TransactionPersistencePort; import com.cdx.bas.domain.transaction.TransactionStatus; -import jakarta.annotation.Nullable; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.ws.rs.GET; diff --git a/mvnw b/mvnw index eaa3d308..8d937f4c 100755 --- a/mvnw +++ b/mvnw @@ -8,7 +8,7 @@ # "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 @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Maven Start Up Batch script +# Apache Maven Wrapper startup batch script, version 3.2.0 # # Required ENV vars: # ------------------ @@ -27,7 +27,6 @@ # # Optional ENV vars # ----------------- -# M2_HOME - location of maven2's installed home dir # MAVEN_OPTS - parameters passed to the Java VM when running Maven # e.g. to debug Maven itself, use # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 @@ -54,7 +53,7 @@ fi cygwin=false; darwin=false; mingw=false -case "`uname`" in +case "$(uname)" in CYGWIN*) cygwin=true ;; MINGW*) mingw=true;; Darwin*) darwin=true @@ -62,9 +61,9 @@ case "`uname`" in # See https://developer.apple.com/library/mac/qa/qa1170/_index.html if [ -z "$JAVA_HOME" ]; then if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" + JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME else - export JAVA_HOME="/Library/Java/Home" + JAVA_HOME="/Library/Java/Home"; export JAVA_HOME fi fi ;; @@ -72,68 +71,38 @@ esac if [ -z "$JAVA_HOME" ] ; then if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` + JAVA_HOME=$(java-config --jre-home) fi fi -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + JAVA_HOME=$(cygpath --unix "$JAVA_HOME") [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` + CLASSPATH=$(cygpath --path --unix "$CLASSPATH") fi # For Mingw, ensure paths are in UNIX format before anything is touched if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && + JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" fi if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + javaExecutable="$(which javac)" + if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + readLink=$(which readlink) + if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + javaHome="$(dirname "\"$javaExecutable\"")" + javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" else - javaExecutable="`readlink -f \"$javaExecutable\"`" + javaExecutable="$(readlink -f "\"$javaExecutable\"")" fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` + javaHome="$(dirname "\"$javaExecutable\"")" + javaHome=$(expr "$javaHome" : '\(.*\)/bin') JAVA_HOME="$javaHome" export JAVA_HOME fi @@ -149,7 +118,7 @@ if [ -z "$JAVACMD" ] ; then JAVACMD="$JAVA_HOME/bin/java" fi else - JAVACMD="`\\unset -f command; \\command -v java`" + JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" fi fi @@ -163,12 +132,9 @@ if [ -z "$JAVA_HOME" ] ; then echo "Warning: JAVA_HOME environment variable is not set." fi -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - # traverses directory structure from process work directory to filesystem root # first directory with .mvn subdirectory is considered project base directory find_maven_basedir() { - if [ -z "$1" ] then echo "Path not specified to find_maven_basedir" @@ -184,96 +150,99 @@ find_maven_basedir() { fi # workaround for JBEAP-8937 (on Solaris 10/Sparc) if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` + wdir=$(cd "$wdir/.." || exit 1; pwd) fi # end of workaround done - echo "${basedir}" + printf '%s' "$(cd "$basedir" || exit 1; pwd)" } # concatenates all lines of a file concat_lines() { if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" + # Remove \r in case we run on Windows within Git Bash + # and check out the repository with auto CRLF management + # enabled. Otherwise, we may read lines that are delimited with + # \r\n and produce $'-Xarg\r' rather than -Xarg due to word + # splitting rules. + tr -s '\r\n' ' ' < "$1" + fi +} + +log() { + if [ "$MVNW_VERBOSE" = true ]; then + printf '%s\n' "$1" fi } -BASE_DIR=`find_maven_basedir "$(pwd)"` +BASE_DIR=$(find_maven_basedir "$(dirname "$0")") if [ -z "$BASE_DIR" ]; then exit 1; fi +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR +log "$MAVEN_PROJECTBASEDIR" + ########################################################################################## # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central # This allows using the maven wrapper in projects that prohibit checking in binary data. ########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi +wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" +if [ -r "$wrapperJarPath" ]; then + log "Found $wrapperJarPath" else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi + log "Couldn't find $wrapperJarPath, downloading it ..." + if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" else - jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + while IFS="=" read -r key value; do + # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) + safeValue=$(echo "$value" | tr -d '\r') + case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" + log "Downloading from: $wrapperUrl" + if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` + wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") fi if command -v wget > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi + log "Found wget ... using wget" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" fi elif command -v curl > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi + log "Found curl ... using curl" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" fi - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + log "Falling back to using Java to download" + javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" # For Cygwin, switch paths to Windows format before running javac if $cygwin; then - javaClass=`cygpath --path --windows "$javaClass"` + javaSource=$(cygpath --path --windows "$javaSource") + javaClass=$(cygpath --path --windows "$javaClass") fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then + log " - Compiling MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/javac" "$javaSource") fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + if [ -e "$javaClass" ]; then + log " - Running MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" fi fi fi @@ -282,35 +251,58 @@ fi # End of extension ########################################################################################## -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR +# If specified, validate the SHA-256 sum of the Maven wrapper jar file +wrapperSha256Sum="" +while IFS="=" read -r key value; do + case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; + esac +done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" +if [ -n "$wrapperSha256Sum" ]; then + wrapperSha256Result=false + if command -v sha256sum > /dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then + wrapperSha256Result=true + fi + elif command -v shasum > /dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then + wrapperSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." + echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." + exit 1 + fi + if [ $wrapperSha256Result = false ]; then + echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 + echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 + echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 + exit 1 + fi fi + MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" # For Cygwin, switch paths to Windows format before running java if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + CLASSPATH=$(cygpath --path --windows "$CLASSPATH") [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` + MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") fi # Provide a "standardized" way to retrieve the CLI args that will # work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" export MAVEN_CMD_LINE_ARGS WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain +# shellcheck disable=SC2086 # safe args exec "$JAVACMD" \ $MAVEN_OPTS \ $MAVEN_DEBUG_OPTS \ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" \ "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd old mode 100644 new mode 100755 index abb7c324..c4586b56 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -7,7 +7,7 @@ @REM "License"); you may not use this file except in compliance @REM with the License. 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, @REM software distributed under the License is distributed on an @@ -18,13 +18,12 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script +@REM Apache Maven Wrapper startup batch script, version 3.2.0 @REM @REM Required ENV vars: @REM JAVA_HOME - location of a JDK home dir @REM @REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven @@ -120,10 +119,10 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B ) @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central @@ -134,11 +133,11 @@ if exist %WRAPPER_JAR% ( ) ) else ( if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" ) if "%MVNW_VERBOSE%" == "true" ( echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% + echo Downloading from: %WRAPPER_URL% ) powershell -Command "&{"^ @@ -146,7 +145,7 @@ if exist %WRAPPER_JAR% ( "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ "}" if "%MVNW_VERBOSE%" == "true" ( echo Finished downloading %WRAPPER_JAR% @@ -154,6 +153,24 @@ if exist %WRAPPER_JAR% ( ) @REM End of extension +@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file +SET WRAPPER_SHA_256_SUM="" +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B +) +IF NOT %WRAPPER_SHA_256_SUM%=="" ( + powershell -Command "&{"^ + "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ + "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ + " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ + " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ + " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ + " exit 1;"^ + "}"^ + "}" + if ERRORLEVEL 1 goto error +) + @REM Provide a "standardized" way to retrieve the CLI args that will @REM work with both Windows and non-Windows executions. set MAVEN_CMD_LINE_ARGS=%* diff --git a/pom.xml b/pom.xml index c9f29f1a..cbdbba2f 100644 --- a/pom.xml +++ b/pom.xml @@ -51,13 +51,6 @@ client ${project.version} - - ${quarkus.platform.group-id} - ${quarkus.platform.artifact-id} - ${quarkus.platform.version} - pom - import - io.quarkus quarkus-maven-plugin