Compare commits

...
500 Commits
Author SHA1 Message Date
Ruchi DhamankarandArnold Gálovics 29b900cccd FINERACT-1818-Loan-Retrieve-Api-data-addition
Fineract Build & Test - MySQL / build (push) Canceled after 0s
Fineract Build & Test - PostgreSQL / build (push) Canceled after 0s
Fineract Docker build - MariaDB / build (push) Canceled after 0s
Fineract Docker build - PostgreSQL / build (push) Canceled after 0s
Fineract Documentation build / build (push) Canceled after 0s
Fineract Build & Test - MariaDB / build (push) Canceled after 0s
2022-12-06 13:52:48 +01:00
dependabot[bot]andArnold Gálovics 5478435567 chore(deps): bump actions/setup-java
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 19eeec562b37d29a1ad055b7de9c280bd0906d8d to c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/19eeec562b37d29a1ad055b7de9c280bd0906d8d...c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-06 13:52:20 +01:00
Adam Saghy e5f4cc8199 FINERACT-1825: Fix end of month handling 2022-12-05 14:56:40 +01:00
Adam SaghyandArnold Gálovics a708251c65 FINERACT-1760: Fix reversal external id handling 2022-12-05 14:13:08 +01:00
Renovate BotandArnold Gálovics 4ba40c2418 chore(deps): update actions/setup-java digest to 19eeec5 2022-12-05 13:03:08 +01:00
Adam SaghyandArnold Gálovics 0162ffe1ea FINERACT-1760: Fix error handling for loan charge details 2022-12-01 22:51:19 +01:00
taskain7andArnold Gálovics de0910f337 [FINERACT-1678] Resilient manager instance 2022-11-30 14:02:53 +01:00
Arnold GalovicsandArnold Gálovics 0b7a484cff FINERACT-1724: Minor cleanup 2022-11-30 11:35:02 +01:00
Adam Saghy e95eba3e8a FINERACT-1760: Fix error handling 2022-11-30 11:13:21 +01:00
Janos HaberandArnold Gálovics 8c7e417c5d FINERACT-1744
- [x] Purge Processed Commands Jobs
- [x] Refactor CommandProcessingResultType to CommandProcessingStatus
2022-11-30 09:55:59 +01:00
Arnold GalovicsandArnold Gálovics 0c63bf2f27 FINERACT-1724: Fixed fineract-client generation to handle non-required request bodies in APIs 2022-11-30 08:58:41 +01:00
taskain7andArnold Gálovics 47108e0ac9 [FINERACT-1678] Fix Inline COB execution 2022-11-30 08:52:36 +01:00
Ruchi DhamankarandArnold Gálovics 53b474b461 FINERACT-1760-Link-Transaction-Reverse-Replay 2022-11-29 14:03:57 +01:00
taskain7andArnold Gálovics b7f88d1196 [FINERACT-1678] Fix Job API with empty request body 2022-11-29 12:55:06 +01:00
Ruchi DhamankarandArnold Gálovics 856c47398d FINERACT-1734-Repayment-Due-Events-Payload-Extension 2022-11-29 10:33:32 +01:00
Adam SaghyandArnold Gálovics 4c597b61fb FINERACT-1760: Raise transaction replayed business event 2022-11-29 10:04:22 +01:00
Arnold GalovicsandArnold Gálovics bbd1ca75a1 Reverted gradle version upgrade from 7.6 to 7.5.1 2022-11-28 23:27:28 +01:00
Renovate BotandArnold Gálovics f40b532c6a chore(deps): update all non-major dependencies 2022-11-28 23:27:28 +01:00
Adam Saghy 82641f6357 FINERACT-1822: Fix Undo waive loan charge API response inconsistency 2022-11-28 21:26:19 +01:00
Jose Alberto HernandezandArnold Gálovics 66aab8d157 Fix Delinquency Classification for scenario 2022-11-28 20:03:09 +01:00
Arnold GalovicsandArnold Gálovics 418675b800 Making duplicate classpath scanning test result more understandable and a few reorganizations for MariaDB and PostgreSQL deps 2022-11-28 16:56:05 +01:00
Renovate BotandArnold Gálovics 6e7e4221ba fix(deps): update non-major 2022-11-28 16:56:05 +01:00
taskain7andArnold Gálovics ca51084e86 [FINERACT-1678] Introducing Last COB Business Date for loans 2022-11-28 15:27:07 +01:00
Janos HaberandArnold Gálovics 6f7f55a227 FINERACT-1724
- [x] eliminate sonar security hotspots
- [x] eliminate sonar bugs
2022-11-28 15:26:49 +01:00
Janos HaberandArnold Gálovics 5210bf7412 FINERACT-1744 - Idempotency support
- [x] Idempotency write move to filters
- [x] Idempotency integration test with success and failure
- [x] Added response status code to database
- [x] SynchronousCommandProcessingService not generate the command, just marked to the filter
- [x] IdempotencyStoreFilter store the command request if available.
- [x] Removed JpaExceptionHandler.java
2022-11-28 12:04:03 +01:00
Adam SaghyandArnold Gálovics 25c0b6a08d FINERACT-1760: Enhanced external id support for loan charges 2022-11-28 12:02:00 +01:00
Vic RomeroandArnold Gálovics 2f4dcbdd6c FINERACT-1820: Update for Authentication in Legacy Docs 2022-11-27 20:25:05 +01:00
Adam Saghy a370875ce8 FINERACT-1760: Enhanced external id support for loan transactions 2022-11-26 14:39:36 +01:00
Janos HaberandArnold Gálovics 3f0872d1ec FINERACT-1724
- [x] eliminate sonar security hotspots
2022-11-25 10:58:59 +01:00
Adam Saghy 5079059405 FINERACT-1760: Enhanced external id support for loan transactions 2022-11-24 23:08:09 +01:00
Jose Alberto HernandezandAdam Saghy 838d05f987 Fix for GL entries for Credit Balance Refund transaction 2022-11-24 22:21:46 +01:00
Arnold GalovicsandArnold Gálovics 1899b517b4 FINERACT-1724: Batch API support for Loan chargeback and fineract client adjustments 2022-11-24 19:08:21 +01:00
Jose Alberto HernandezandArnold Gálovics 729316e4a0 Fix datatable put call with resource id 2022-11-24 15:41:22 +01:00
Ruchi DhamankarandArnold Gálovics a1a6435283 FINERACT-1678--Extending-jobs-with-module-system-documentation 2022-11-24 12:40:12 +01:00
Aleksandar VidakovicandAleksandar Vidakovic 5338263bd8 FINERACT-1794: Address improvement in file upload APIs 2022-11-23 20:28:50 +01:00
Ruchi DhamankarandArnold Gálovics c1df5e73a2 FINERACT-1678-Extending-jobs-with-module-system 2022-11-23 15:51:00 +01:00
Arnold GalovicsandArnold Gálovics 4b290663d3 FINERACT-1724: Minor cleanup around client transaction services 2022-11-23 13:17:15 +01:00
Janos HaberandArnold Gálovics d5b4546886 FINERACT-1724
- [x] Refactoring ThitsaWorksCreditBureauIntegrationWritePlatformServiceImpl
- [x] Fix NPE and test added to ThitsaWorksCreditBureauIntegrationWritePlatformServiceImplTest
2022-11-21 13:54:55 +01:00
Jose Alberto HernandezandAdam Saghy 4f9f71da9b Fix Loan Delinquency Classification after Repayment 2022-11-21 13:49:45 +01:00
Aleksandar VidakovicandAleksandar Vidakovic 36a81580be FINERACT-1807: Extension point - data service 2022-11-18 18:45:05 +01:00
Arnold GalovicsandArnold Gálovics fe12ed3635 FINERACT-1724: Swagger fix for loan transaction API 2022-11-18 17:10:34 +01:00
Jose Alberto HernandezandAdam Saghy 4e3e078d7f Fix chargeback transaction amount zero 2022-11-17 22:32:30 +01:00
Ruchi DhamankarandArnold Gálovics 1331073679 FINERACT-1734-Repayment-due-event 2022-11-17 14:13:13 +01:00
Janos HaberandArnold Gálovics 6ba5d7d5c4 Fix credit bureau organisation result processing in the test case.
FINERACT-1724
[x] Unit test for ThitsaWorksCreditBureauIntegrationWritePlatformServiceImpl
[x] Integration test for CreditBureau with WireMock
[x] Fix enum key case sensitivity on postgres
[x] Fix update key typo
[x] Add missing credit bureau organization fix for test cases
2022-11-16 14:04:36 +01:00
b0c1andArnold Gálovics 0155db70b7 Fix possible null 2022-11-16 07:08:50 +01:00
Renovate BotandArnold Gálovics b132c2bcbe chore(deps): update all non-major dependencies 2022-11-14 16:33:58 +01:00
Renovate BotandArnold Gálovics 02dd75a271 fix(deps): update non-major 2022-11-14 16:05:02 +01:00
taskain7andArnold Gálovics c9a4aab466 [FINERACT-1678] Loan COB - skip non-owned locked loan accounts 2022-11-14 11:18:56 +01:00
Ruchi DhamankarandArnold Gálovics 1cf37341d5 FINERACT-1734-Deliquency-range-event 2022-11-10 16:38:51 +01:00
Adam Saghy cb1d1d0d5d FINERACT-1761: New Charge Adjustment transaction 2022-11-10 09:36:10 +01:00
taskain7andArnold Gálovics 48bbc9b266 [FINERACT-1678] LoanCOBApiFIlter throws NPE when user is not authenticated 2022-11-08 15:55:09 +01:00
taskain7andArnold Gálovics 3951e69ad7 [FINERACT-1678] Introducing synchronous COB execution for loan account changing APIs 2022-11-08 14:46:51 +01:00
dependabot[bot]andArnold Gálovics 70a0a3e2e9 chore(deps): bump gradle/wrapper-validation-action
Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 9aa31f26bc8e536d1faf4b332bb8365350743a18 to 1.0.5. This release includes the previously tagged commit.
- [Release notes](https://github.com/gradle/wrapper-validation-action/releases)
- [Commits](https://github.com/gradle/wrapper-validation-action/compare/9aa31f26bc8e536d1faf4b332bb8365350743a18...55e685c48d84285a5b0418cd094606e199cca3b6)

---
updated-dependencies:
- dependency-name: gradle/wrapper-validation-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 10:32:37 +01:00
Aleksandar VidakovicandAleksandar Vidakovic 744abd1364 FINERACT-1795: Improve resilience of command processing service 2022-11-07 21:35:43 +01:00
Arnold GalovicsandArnold Gálovics aa7747c5ce FINERACT-1724: Added loan external ID into transaction events 2022-11-07 17:49:40 +01:00
Renovate BotandArnold Gálovics 24efd6da1c chore(deps): update all non-major dependencies 2022-11-07 13:39:53 +01:00
Renovate BotandArnold Gálovics 29d14a7e43 chore(deps): update gradle/wrapper-validation-action digest to 9aa31f2 2022-11-07 12:20:43 +01:00
Arnold GalovicsandArnold Gálovics a7d737b215 FINERACT-1724: Refactoring the business event serializers for better extensability 2022-11-07 11:16:18 +01:00
Arnold GalovicsandArnold Gálovics d2a12c3cfc FINERACT-1724: Added loanId to LoanTransactionData and extended the respective Avro schema 2022-11-03 15:40:08 +01:00
Arnold GalovicsandArnold Gálovics 532bc507b6 FINERACT-1724: Swagger enhancements + Batch API enhancements 2022-11-03 15:40:01 +01:00
Ruchi DhamankarandArnold Gálovics 6c72ee49d8 FINERACT-1734-Repayment-due-event 2022-11-03 11:50:47 +01:00
Arnold GalovicsandArnold Gálovics 11e22f6117 FINERACT-1724: Making the LoanNotFoundException backward compatible again 2022-11-03 10:52:23 +01:00
Jose Alberto HernandezandArnold Gálovics 90f1eccd4b Delinquency classification including Chargeback transactions 2022-11-02 15:37:39 +01:00
taskain7andArnold Gálovics cce7902054 [FINERACT-1678] Bypass LoanAccount Write Protection 2022-11-02 11:57:31 +01:00
Jose Alberto HernandezandArnold Gálovics ee3019603c Fix no enum constant http methods 2022-11-02 10:42:51 +01:00
Aleksandar VidakovicandAleksandar Vidakovic fc895fce05 FINERACT-1783: Customizeable LoanRepaymentScheduleTransactionProcessor 2022-11-01 14:08:02 +01:00
Vic RomeroandAleksandar Vidakovic f2756b25bb FINERACT-1791 2022-10-29 11:53:45 +02:00
Ruchi DhamankarandArnold Gálovics 1c944dd830 FINERACT-1694-Validating-event-configuration 2022-10-28 17:48:59 +02:00
taskain7andArnold Gálovics 7be193dd0b [FINERACT-1678] Reject write API calls for hard-locked loan accounts 2022-10-28 14:04:46 +02:00
Adam SaghyandArnold Gálovics e76adfbe56 FINERACT-1787: Fineract using wrong business date due to lack of resetting the ActionContext 2022-10-27 15:39:23 +02:00
Zoltan NebliandArnold Gálovics a293dee55c FINERACT-1744 add idempotency key storing for http requests 2022-10-27 10:37:51 +02:00
Arnold GalovicsandArnold Gálovics 3898e2b836 FINERACT-1724: Batch API enhancements 2022-10-26 19:10:41 +02:00
Ruchi DhamankarandArnold Gálovics 8e0273bfc0 FINERACT-1694-Event-Configuration-Apis 2022-10-26 14:44:16 +02:00
Adam SaghyandArnold Gálovics 2543e6f6a3 FINERACT-1784: Support undo waive charge for specific due date charges 2022-10-26 13:55:54 +02:00
Jose Alberto HernandezandArnold Gálovics 8954de5ded Allow to add charge with same disbursement date 2022-10-26 13:55:41 +02:00
Jose Alberto HernandezandArnold Gálovics 7c6e85be10 Send error code to 403 in Loan Fraud on error 2022-10-26 12:11:08 +02:00
Arnold GalovicsandArnold Gálovics 6cb741a7a2 FINERACT-1724: Swagger fix for Inline Job execution 2022-10-25 18:32:04 +02:00
dependabot[bot]andArnold Gálovics 1ccb67fd9e chore(deps): bump gradle/wrapper-validation-action from 1.0.4 to 1.0.5
Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/gradle/wrapper-validation-action/releases)
- [Commits](https://github.com/gradle/wrapper-validation-action/compare/e6e38bacfdf1a337459f332974bb2327a31aaf4b...55e685c48d84285a5b0418cd094606e199cca3b6)

---
updated-dependencies:
- dependency-name: gradle/wrapper-validation-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 12:43:09 +02:00
Jose Alberto HernandezandArnold Gálovics ce4c1dd137 Fix Loan Transaction Chargeback outstanding 2022-10-24 16:32:55 +02:00
dependabot[bot]andArnold Gálovics 134b6248a1 chore(deps): bump actions/upload-artifact from 3.1.0 to 3.1.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/3cea5372237819ed00197afe530f5a7ea3e805c8...83fd05a356d7e2593de66fc9913b3002723633cb)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 14:05:13 +02:00
Arnold GalovicsandArnold Gálovics 27c50305f0 FINERACT-1724: Making sure that Loan account status change business events are only triggered when an actual change happens 2022-10-24 11:08:55 +02:00
Renovate BotandArnold Gálovics ba55407c5a chore(deps): update all non-major dependencies 2022-10-24 11:02:54 +02:00
Jose Alberto HernandezandArnold Gálovics b2482c9226 Setting Fraud flag for a loan account 2022-10-21 20:26:21 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 0049a9e3f9 FINERACT-1758: Improve custom module example (fix) 2022-10-21 19:01:35 +02:00
Arnold GalovicsandArnold Gálovics 81d9e4a961 FINERACT-1694: Extending MessageV1 and BulkMessageV1 with businessDate + fixing bulk event handling for publication + mapstruct mapper fixes to be more strict 2022-10-21 11:43:27 +02:00
Arnold GalovicsandArnold Gálovics d1f3ffe490 FINERACT-1724-9: Fixing the retrieval of loan charge details with including the loanId as well 2022-10-21 11:21:21 +02:00
Arnold GalovicsandArnold Gálovics 3cd4db8209 FINERACT-1724: Ability to customize the EntityManagerFactory from custom
modules
2022-10-20 06:39:29 +02:00
Adam SaghyandArnold Gálovics f496e2ff0e FINERACT-1782: Improve code quality - Member of Spring components should be injected 2022-10-19 13:19:40 +02:00
Zoltan NebliandArnold Gálovics f3aeef2f45 FINERACT-1744 add idempotency key to command_source table 2022-10-19 12:53:22 +02:00
dependabot[bot]andArnold Gálovics dae12cdd46 chore(deps): bump actions/setup-java from 3.5.1 to 3.6.0
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/a18c333f3f14249953dab3e186e5e21bf3390f1d...de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-19 11:37:08 +02:00
taskain7andArnold Gálovics ebe87433e7 [FINERACT-1678] Inline COB API 2022-10-18 19:14:38 +02:00
Jose Alberto HernandezandArnold Gálovics 22bcccb17b Loan summary with principal adjustments 2022-10-17 18:51:03 +02:00
Ruchi DhamankarandArnold Gálovics c9d5742836 FINERACT-1694-Event-Configuration-Database-Storage 2022-10-17 15:15:52 +02:00
Hemant GuptaandArnold Gálovics 55b1baeacb refactor: add lombok to sms module 2022-10-17 12:18:02 +02:00
Ruchi DhamankarandArnold Gálovics 04e07890a4 FINERACT-1694-ActiveMQ-failover-transport-support 2022-10-17 12:17:39 +02:00
Hemant GuptaandArnold Gálovics 3d332f0840 refactor: add lombok to mix module 2022-10-15 13:22:59 +02:00
Zoltan NebliandArnold Gálovics ad2f2862cb FINERACT-1747 add datatable query api 2022-10-15 09:02:17 +02:00
Hemant GuptaandArnold Gálovics f26b7bc576 refactor: add lombok to survey module 2022-10-15 09:02:01 +02:00
Hemant GuptaandArnold Gálovics 6ea6cb4cb1 refactor: add lombok to security module 2022-10-15 08:22:58 +02:00
Hemant GuptaandArnold Gálovics b45baa12b0 refactor: add lombok to holiday module 2022-10-15 08:10:05 +02:00
Aleksandar VidakovicandAleksandar Vidakovic ba765f9b7a FINERACT-1758: Improve custom module example 2022-10-14 18:57:36 +02:00
Arnold GalovicsandArnold Gálovics 388612b1ae FINERACT-1724
Added batch support for the Get Charge by Id call.
Added externalId field to PostLoansLoanIdChargesRequest.
Added submittedOnDate column to m_loan_charge table.
Updated logic to return new submittedOnDate field in GetLoansLoanIdChargesChargeIdResponse.
2022-10-14 17:57:29 +02:00
Adam SaghyandArnold Gálovics b33e3ac892 FINERACT-1773: Allow 'specific due date charges' to be applied after the maturity date 2022-10-14 17:45:29 +02:00
dependabot[bot]andArnold Gálovics 12e548ad82 chore(deps): bump actions/setup-node from 3.5.0 to 3.5.1
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/969bd2663942d722d85b6a8626225850c2f7be4b...8c91899e586c5b171469028077307d293428b516)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-14 10:51:00 +02:00
Hemant GuptaandArnold Gálovics 8b5a0262de refactor: add lombok to provisioning module 2022-10-13 20:44:12 +02:00
Hemant GuptaandArnold Gálovics b4cd3cf54f refactor: add lombok codes module 2022-10-13 13:02:49 +02:00
Hemant GuptaandArnold Gálovics 0f2850fff5 refactor: add lombok to notification module 2022-10-13 10:50:52 +02:00
Hemant GuptaandArnold Gálovics 5b935eb1ff refactor: add lombok to hooks module 2022-10-13 10:42:09 +02:00
Hemant GuptaandArnold Gálovics 5d1d20e577 refactor: add lombok to gcm module 2022-10-13 10:40:07 +02:00
Jose Alberto HernandezandAleksandar Vidakovic ae71df17df Charge back Loan Transaction updates repayment schedule 2022-10-12 21:08:09 +02:00
Hemant GuptaandArnold Gálovics 6d2447e327 refactor: add lombok to reportmailingjob module 2022-10-12 12:55:28 +02:00
Hemant GuptaandArnold Gálovics 8862f1f824 refactor: add lombok to entityaccess module 2022-10-12 12:32:38 +02:00
Hemant GuptaandArnold Gálovics bc289bcb4d refactor: add lombok to jobs module 2022-10-12 12:23:29 +02:00
Arnold GalovicsandArnold Gálovics 592ed92e87 FINERACT-1724: Swagger fixes for PostLoansLoanIdTransactionsTransactionIdRequest 2022-10-11 17:08:42 +02:00
Ruchi DhamankarandArnold Gálovics 0ae8445f07 FINERACT-1694-Regular-Event-Purging 2022-10-11 14:42:31 +02:00
Aleksandar Vidakovic 93481bde6f PS-15: Revert 2022-10-10 16:38:48 +02:00
Aleksandar Vidakovic f79c132ea8 PS-15: Synchronize the openmf develop branch with upstream 2022-10-10 16:32:47 +02:00
Wilfred KigenyiandGitHub 75b6f61e5d FINERACT-1724: Correct descriptions and summary on DELETE and PUT (#2458)
FINERACT-1724: Correct descriptions and summary on DELETE and PUT
2022-10-10 16:07:19 +02:00
Hemant GuptaandArnold Gálovics 9b039ff136 refactor: add lombok to emailcampaigns module 2022-10-10 16:00:59 +02:00
logoutdhavalandArnold Gálovics ba1d0ce66c FINERACT-1748: Loan prepayment issue after advance payment 2022-10-10 15:56:50 +02:00
Tapasweni PathakandArnold Gálovics 47c9b93d27 Refine documentation for migration of database from MySQL to PostgreSQL including the migration from Flyway to Liquibase for database migration scripts 2022-10-10 14:54:54 +02:00
logoutdhavalandArnold Gálovics 17e5eae7a3 FINERACT-1755:withdrawal fee is not considered for interest calculation 2022-10-10 14:51:56 +02:00
Arnold GalovicsandAleksandar Vidakovic 37205bef39 FINERACT-1724: Enhancements on batch API support for adjusting a loan transaction 2022-10-10 14:25:01 +02:00
Renovate BotandArnold Gálovics 9ad0124757 fix(deps): update non-major 2022-10-10 13:43:44 +02:00
Renovate BotandArnold Gálovics 303619e983 chore(deps): update all non-major dependencies 2022-10-10 11:42:37 +02:00
dependabot[bot]andArnold Gálovics 87535f7786 chore(deps): bump actions/stale from 5.2.0 to 6.0.1
Bumps [actions/stale](https://github.com/actions/stale) from 5.2.0 to 6.0.1.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/99b6c709598e2b0d0841cd037aaf1ba07a4410bd...5ebf00ea0e4c1561e9b43a292ed34424fb1d4578)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 11:34:31 +02:00
dependabot[bot]andArnold Gálovics c3485ffb82 chore(deps): bump actions/setup-node from 3.4.1 to 3.5.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/2fddd8803e2f5c9604345a0b591c3020ee971a93...969bd2663942d722d85b6a8626225850c2f7be4b)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 11:22:35 +02:00
dependabot[bot]andArnold Gálovics d429370875 chore(deps): bump actions/checkout from 3.0.2 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/2541b1294d2704b0964813337f33b291d3f8596b...93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 10:30:45 +02:00
Ruchi DhamankarandAleksandar Vidakovic a61e2d9659 FINERACT-1694-TenantIdentifier-ExternalEvents 2022-10-07 15:38:55 +02:00
Renovate BotandPetri Tuomola a2878cd1ed chore(deps): update all non-major dependencies 2022-10-05 10:52:07 +08:00
Renovate BotandPetri Tuomola 7e0fe7d386 chore(deps): update actions/stale digest to 99b6c70 2022-10-05 10:51:19 +08:00
Renovate BotandPetri Tuomola 4b529357f4 chore(deps): update actions/setup-java digest to a18c333 2022-10-05 10:50:37 +08:00
Davies Tobi AlexandPetri Tuomola e21331bcc1 Externalising OAuth Server URL
Externalising the OAuth JWT URI for instances whereby the port and hostname will be different to what is currently configured, especially if you are using docker and you wish to use container names rather than IP or `localhost`
2022-10-05 10:50:00 +08:00
taskain7andAleksandar Vidakovic 24fc4f1939 [FINERACT-1678] Loan accounts stayed locked business event 2022-10-04 20:43:16 +02:00
taskain7andAleksandar Vidakovic f4979d2c9b [FINERACT-1678] business step configuration fix 2022-10-04 09:48:12 +02:00
Ruchi DhamankarandAleksandar Vidakovic 44cab78cbb FINERACT-1694-Asynchronous-Message-OutChannel-Rename 2022-10-03 22:35:16 +02:00
Jose Alberto HernandezandAleksandar Vidakovic 40b6eb50f6 Chargeback Loan Transaction 2022-09-30 21:22:23 +02:00
Ruchi DhamankarandAleksandar Vidakovic 5bd804ada8 FINERACT-1694 Categorization for Events 2022-09-30 09:13:10 +02:00
Adam SaghyandAleksandar Vidakovic af63dbc9fa FINERACT-1754: Turn off unnecessary logging 2022-09-28 00:06:52 +02:00
d4517f4a4d Remove disbursement details in undo loan disbursal action (#2609)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
2022-09-27 13:15:59 -05:00
Ruchi DhamankarandAleksandar Vidakovic ee0184c0a5 FINERACT-1694 JMS ActiveMQ downstream channel integration for events 2022-09-27 17:06:29 +02:00
Arnold GalovicsandArnold Gálovics 18ebb3be6c FINERACT-1724: Swagger enhancements for posting a new savings transaction 2022-09-23 13:15:00 +02:00
Jose Alberto HernandezandArnold Gálovics 1521b9dcf6 Fix loan repayment schedule with multidisburse 2022-09-22 10:58:23 +02:00
Arnold GalovicsandArnold Gálovics c8a084cb97 FINERACT-1724: Swagger fixes here and there 2022-09-22 09:46:27 +02:00
Arnold GalovicsandArnold Gálovics 69f535731f FINERACT-1734: Added a new DisbursalTransactionBusinessEvent for disbursement txes 2022-09-22 09:46:11 +02:00
Arnold GalovicsandArnold Gálovics 0f4d232897 FINERACT-1724: Swagger fixes for updating a loan application 2022-09-21 14:55:50 +02:00
Hemant GuptaandArnold Gálovics c761b40279 refactor: add lombok to adhocquery module 2022-09-19 13:27:32 +02:00
Jose Alberto HernandezandArnold Gálovics 33d781f5fb Loan Delinquency Tags with Loan charges 2022-09-19 13:23:02 +02:00
Hemant GuptaandArnold Gálovics f86841646b refactor: add lombok to Creditbureau module 2022-09-19 11:53:57 +02:00
Ruchi DhamankarandArnold Gálovics e9ae88d057 FINERACT-1694 Send Asynchronous Events 2022-09-16 18:36:52 +02:00
Jose Alberto HernandezandArnold Gálovics 744d38c588 Manage scheduler and cob jobs 2022-09-16 17:26:19 +02:00
Arnold GalovicsandArnold Gálovics 6bd21e71be FINERACT-1734: Added a separate Loan business event for every monetary activity 2022-09-16 15:22:59 +02:00
Jose Alberto HernandezandArnold Gálovics a313bced0a Add disallowExpectedDisbursements flag in Loan account response 2022-09-15 11:05:25 +02:00
Arnold GalovicsandArnold Gálovics 714a881be2 Keeping Logback on version 1.2.11 intentionally since it's not
compatible with Spring Boot 2.x but only 3.x in the future.

More details here:
- http://mailman.qos.ch/pipermail/logback-user/2022-September/005235.html
- https://github.com/spring-projects/spring-boot/issues/12649
2022-09-14 14:08:12 +02:00
Renovate BotandArnold Gálovics 131ecefd2a chore(deps): update all non-major dependencies 2022-09-14 14:08:12 +02:00
Adam SaghyandArnold Gálovics 44db1d7b94 FINERACT-1678: Soft-lock Loan COB relevant loan accounts upon startup 2022-09-13 16:47:12 +02:00
Hemant GuptaandArnold Gálovics f258aa258c refactor: add lombok to configuration module 2022-09-13 14:54:54 +02:00
Hemant GuptaandArnold Gálovics e67b859ea1 refactor: add lombok to cache module 2022-09-13 14:46:19 +02:00
Hemant GuptaandArnold Gálovics cce97aaf1a refactor: add lombok to businessdate module 2022-09-13 14:44:44 +02:00
Hemant GuptaandArnold Gálovics 41e6edcfa2 refactor: add lombok to batch module 2022-09-13 14:31:53 +02:00
Arnold GalovicsandArnold Gálovics b5b189d610 FINERACT-1744: Tiny refactorings as a preparation for idempotency implementation 2022-09-13 13:40:24 +02:00
Renovate BotandArnold Gálovics 622e32e737 fix(deps): update non-major 2022-09-12 16:41:41 +02:00
Arnold GalovicsandArnold Gálovics 7558b09def FINERACT-1694: Bulk event support 2022-09-12 14:45:34 +02:00
Arnold GalovicsandArnold Gálovics a0749ffe19 Batch API read optimization + minor changes 2022-09-11 16:56:12 +02:00
Arnold GalovicsandArnold Gálovics 130d9c0c3d FINERACT-1734: New business events and refactorings 2022-09-11 16:56:03 +02:00
Arnold GalovicsandArnold Gálovics d06c3655af FINERACT-1734: Loan status can and only be set using the State Machine 2022-09-09 16:44:18 +02:00
Arnold GalovicsandArnold Gálovics d003326e48 FINERACT-1734: Refactoring around Loan status changes as a preparation to emit Loan Status change business events 2022-09-09 13:13:37 +02:00
dependabot[bot]andArnold Gálovics 8bb2e9230c chore(deps): bump actions/setup-java from 3.4.1 to 3.5.0
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/2c7a4878f5d120bd643426d54ae1209b29cc01a3...d854b6da19cdadd9a010605529e522c2393ebd38)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-09 10:03:28 +02:00
Adam SaghyandArnold Gálovics 2d73c25226 FINERACT-1678: Lock under processing loan accounts 2022-09-09 10:00:01 +02:00
Arnold GalovicsandArnold Gálovics fa169bb5d4 FINERACT-1694: Documentation for Reliable event framework 2022-09-08 22:04:30 +02:00
Jose Alberto HernandezandArnold Gálovics 17454d0e20 Delinquency classification as a Loan COB business step 2022-09-07 16:30:22 +02:00
Jose Alberto HernandezandArnold Gálovics f26e14ae07 Delinquency classification as a Loan COB business step 2022-09-07 16:30:22 +02:00
Arnold GalovicsandArnold Gálovics 90896a6467 FINERACT-1694: Storing event schema along with external events 2022-09-07 14:45:51 +02:00
72e78df0fc FINERACT-1728:Issue with interest posting fix (#2574)
Co-authored-by: Dhaval Maniyar <dhavalmaniyar@Dhavals-MacBook-Pro.local>
2022-09-07 15:51:42 +05:30
Arnold GalovicsandArnold Gálovics 34aefd5d72 FINERACT-1694: Added tests for MonthDay Avro conversion 2022-09-06 14:09:07 +02:00
Arnold GalovicsandArnold Gálovics 4f312f33f6 FINERACT-1694: Making Avro mapping to fail at compile time for unmapped properties 2022-09-06 13:05:22 +02:00
Jose Alberto HernandezandArnold Gálovics 3f1743a3d4 Real time Loan Delinquency Classification 2022-09-06 12:13:45 +02:00
Arnold GalovicsandArnold Gálovics 17b36a0919 FINERACT-1694: Reworked bulk external events 2022-09-04 18:23:55 +02:00
Jose Alberto HernandezandArnold Gálovics 0980aa8abf Loan Delinquency Classification job 2022-09-03 15:24:01 +02:00
Arnold GalovicsandArnold Gálovics 24a199458f FINERACT-1723: Swagger fixes 2022-09-03 15:23:39 +02:00
Arnold GalovicsandArnold Gálovics 1f1cbfe074 FINERACT-1694-5: Reorganizing business event packages next to external events 2022-09-02 22:20:16 +02:00
Arnold GalovicsandArnold Gálovics f46abaf9e2 FINERACT-1694: External event storage integration 2022-09-02 10:03:09 +02:00
Arnold GalovicsandArnold Gálovics 5a9ddab671 FINERACT-1694: Storing external events fixes 2022-09-02 10:03:09 +02:00
Arnold GalovicsandArnold Gálovics 699f61a9e1 FINERACT-1694: Storing events upon raising 2022-09-02 10:03:09 +02:00
Adam SaghyandArnold Gálovics a04aa45368 FINERACT-1693: Fix null handling of datatables 2022-09-02 08:50:25 +02:00
Hemant GuptaandAleksandar Vidakovic 354d41d2eb refactor: add lombok to rule module 2022-09-02 03:16:19 +02:00
Arnold GalovicsandAleksandar Vidakovic b8e34936d2 Fix for handling Loan rescheduling in batch APIs 2022-09-02 03:14:23 +02:00
Arnold GalovicsandArnold Gálovics 3c3f9011b2 FINERACT-1694: LoanChargeDataV1 Avro schema fixes 2022-09-01 14:59:56 +02:00
Arnold GalovicsandArnold Gálovics fc875047e6 FINERACT-1694: Avro schema adjustments 2022-09-01 08:36:35 +02:00
Dhaval ManiyarandArnold Gálovics 698681278b FINERACT-1695:Accounting report not able to fetch the data in table format 2022-08-30 20:51:40 +02:00
Arnold GalovicsandAleksandar Vidakovic c131e94cb4 FINERACT-1694: Added more Avro schemas 2022-08-30 14:39:12 +02:00
Arnold GalovicsandAleksandar Vidakovic f620a469e8 FINERACT-1694: Fixed Deposit event Avro schemas 2022-08-30 14:39:12 +02:00
Arnold GalovicsandAleksandar Vidakovic b327e710f7 FINERACT-1694: Additional schemas 2022-08-30 14:39:12 +02:00
Arnold GalovicsandAleksandar Vidakovic 264022be4d FINERACT-1694: Avro schemas project + code generation + some initial Avro Schemas 2022-08-30 14:39:12 +02:00
Adam SaghyandArnold Gálovics 4808bb3489 FINERACT-1678: Fix Apply Penalty to overdue loan COB job 2022-08-30 14:11:48 +02:00
Hemant GuptaandArnold Gálovics aa12de397d refactor: add lombok to provisioning module 2022-08-30 13:15:17 +02:00
Aleksandar VidakovicandGitHub 2c4f6e4c61 Merge pull request #2548 from apache/merge-1.8.0
Merge 1.8.0
2022-08-30 11:47:32 +02:00
Hemant GuptaandArnold Gálovics 78c541e992 refactor: add lombok to producttoaccountmapping module 2022-08-29 11:10:29 +02:00
Aleksandar Vidakovic 97bd1ecbe6 Fineract 1.8.0 release 2022-08-28 12:09:53 +02:00
Adam SaghyandArnold Gálovics 950f6489fe FINERACT-1678: Performance improvement of Apply Charge to Overdue Loans COB Business Step 2022-08-26 14:43:32 +02:00
taskain7andArnold Gálovics 5bf9e1a288 [FINERACT-1678] Retrieving locked loan accounts via API 2022-08-26 11:27:09 +02:00
taskain7andArnold Gálovics 81b56fafa0 [FINERACT-1678] Loan COB Partitioner strategy fix 2022-08-26 11:26:23 +02:00
taskain7andArnold Gálovics 48c353fb8f Database storage for events 2022-08-26 11:24:51 +02:00
taskain7andArnold Gálovics 831c5a8eef [FINERACT-1678] COB Execution context fix 2022-08-25 15:45:14 +02:00
2479dd1289 Error with withdraw/deposit transactions after initiating hold transaction (#2540)
Co-authored-by: Dhaval Maniyar <dhavalmaniyar@Dhavals-MacBook-Pro.local>
2022-08-25 18:04:22 +05:30
taskain7andArnold Gálovics 5dd199f34d [FINERACT-1678] Add ActiveMQ configuration 2022-08-24 16:39:05 +02:00
Adam SaghyandArnold Gálovics 5919882a65 FINERACT-1704: Code cleanup - Journal entries 2022-08-23 16:25:19 +02:00
taskain7andArnold Gálovics 0bbd825a46 [FINERACT-1678] API for Business Step configuration fix 2022-08-23 11:57:16 +02:00
rrpawar96andArnold Gálovics d75835170a FINERACT-1330: Pay Charge & withdrawals is violating Overdraft conditions on current and past Transactions 2022-08-23 11:00:10 +02:00
dependabot[bot]andArnold Gálovics ed80540a95 chore(deps): bump gradle/wrapper-validation-action
Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 859c33240bd026ce8d5f711f5adcc65c2f8eafc1 to 1.0.4. This release includes the previously tagged commit.
- [Release notes](https://github.com/gradle/wrapper-validation-action/releases)
- [Commits](https://github.com/gradle/wrapper-validation-action/compare/859c33240bd026ce8d5f711f5adcc65c2f8eafc1...e6e38bacfdf1a337459f332974bb2327a31aaf4b)

---
updated-dependencies:
- dependency-name: gradle/wrapper-validation-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 10:41:51 +02:00
Adam SaghyandArnold Gálovics 23f672adbc FINERACT-1706: Accounting for Chargeback 2022-08-23 10:02:14 +02:00
Dhaval ManiyarandArnold Gálovics b8ebc3967e FINERACT-1695: Accounting report not able to fetch the data in table format 2022-08-23 09:29:24 +02:00
Jose Alberto HernandezandArnold Gálovics b0c4f3dddd Fix Loan Product swagger 2022-08-23 09:27:16 +02:00
Arnold GalovicsandArnold Gálovics e0236efa00 Added refund support for Batch API 2022-08-22 16:18:39 +02:00
Hemant GuptaandArnold Gálovics f86a7c726f refactor: add lombok to GLAccount module 2022-08-22 14:45:56 +02:00
taskain7andArnold Gálovics 340516c1a3 [FINERACT-1678] Spring Batch JMS support 2022-08-22 14:04:58 +02:00
taskain7andArnold Gálovics 02c19c963e [FINERACT-1678] Job execution listeners 2022-08-22 13:36:53 +02:00
taskain7andArnold Gálovics 675dda2b42 [FINERACT-1678] API for job business step configuration 2022-08-22 13:36:38 +02:00
Aleksandar Vidakovic 27489a6850 Prepare release 1.8.0 2022-08-22 12:30:41 +02:00
Adam SaghyandArnold Gálovics 7a2af51e6c Code cleanup - loan product 2022-08-22 11:55:54 +02:00
Jose Alberto HernandezandArnold Gálovics 8b3975f8d7 Loan Delinquency Classification job 2022-08-22 11:52:40 +02:00
Dhaval ManiyarandAleksandar Vidakovic 9000b6e826 FINERACT-1646-backdated-transaction-available-balance-fix 2022-08-22 11:42:52 +02:00
Renovate BotandArnold Gálovics 0af87a8766 chore(deps): update gradle/wrapper-validation-action digest to 859c332 2022-08-22 11:05:13 +02:00
Renovate BotandArnold Gálovics 9addbbbd7f chore(deps): update all non-major dependencies 2022-08-22 11:05:04 +02:00
ManojandGitHub 998b3ff289 delete-duplicate-migration (#2531) 2022-08-22 12:19:04 +05:30
Aleksandar Vidakovic 9cabd179d1 FINERACT-1696: Update README with instructions concerning Mysql UTC behavior 2022-08-22 04:32:35 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 3959a34922 FINERACT-1696: Update README with instructions concerning Mysql UTC behavior 2022-08-22 04:27:14 +02:00
Dhaval ManiyarandAleksandar Vidakovic 7fe34c3d7d FINERACT-1668: Adding Configuration for reversal transaction 2022-08-20 14:07:47 +02:00
Dhaval ManiyarandAleksandar Vidakovic c3b462919f FINERACT-1646-backdated-transaction-available-balance-fix 2022-08-20 12:52:00 +02:00
Dhaval ManiyarandAleksandar Vidakovic c21ea4e1d3 FINERACT-1646-backdated-transaction-available-balance-fix 2022-08-20 12:49:20 +02:00
edc734c946 FINERACT-1668: Adding Configuration for reversal transaction (#2454)
Co-authored-by: Dhaval Maniyar <dhavalmaniyar@Dhavals-MacBook-Pro.local>
2022-08-20 12:22:16 +02:00
erprinceandArnold Gálovics c9be0a2816 FINERACT-1677 fix 2022-08-19 18:38:51 +02:00
Adam SaghyandArnold Gálovics d2e56edba6 FINERACT-1692: Allow disbursement transaction when the loan is fully paid/overpaid 2022-08-19 18:26:03 +02:00
taskain7andArnold Gálovics 9d8b2d38c5 [FINERACT-1678] Store loan account locks 2022-08-19 18:23:01 +02:00
Adam SaghyandArnold Gálovics 1cbafec07e FINERACT-1693: Fix null handling of datatables 2022-08-19 09:31:52 +02:00
Jose Alberto HernandezandArnold Gálovics 6f86982346 Fix Loan Product swagger 2022-08-19 09:30:54 +02:00
dependabot[bot]andArnold Gálovics 0b7517a1ea chore(deps): bump gradle/wrapper-validation-action
Bumps [gradle/wrapper-validation-action](https://github.com/gradle/wrapper-validation-action) from 859c33240bd026ce8d5f711f5adcc65c2f8eafc1 to 1.0.4. This release includes the previously tagged commit.
- [Release notes](https://github.com/gradle/wrapper-validation-action/releases)
- [Commits](https://github.com/gradle/wrapper-validation-action/compare/859c33240bd026ce8d5f711f5adcc65c2f8eafc1...e6e38bacfdf1a337459f332974bb2327a31aaf4b)

---
updated-dependencies:
- dependency-name: gradle/wrapper-validation-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-19 09:29:57 +02:00
taskain7andArnold Gálovics 8184b11c29 [FINERACT-1678] execution order for Loan COB 2022-08-18 13:55:21 +02:00
Francis MwangiandArnold Gálovics f821841a80 [FINERACT-1690] Improve gitpod integrations 2022-08-17 18:54:14 +02:00
Jose Alberto HernandezandArnold Gálovics 80401586e6 Loan transaction reversal data extension 2022-08-17 17:02:37 +02:00
Renovate BotandArnold Gálovics 163b9b1b8a fix(deps): update non-major 2022-08-17 16:33:16 +02:00
Arnold GalovicsandArnold Gálovics a1591e9873 Swagger fixes for Loan refunds 2022-08-17 15:14:15 +02:00
Arnold GalovicsandAleksandar Vidakovic 51782cb642 Dependency fixes for compatibility 2022-08-17 10:53:45 +02:00
Renovate BotandAleksandar Vidakovic 25bd387b14 fix(deps): update dependency org.glassfish.jersey.media:jersey-media-multipart to v3 2022-08-17 10:53:45 +02:00
Jose Alberto HernandezandArnold Gálovics 30e11910f3 Update fineract client for Loan delinquency 2022-08-17 08:37:45 +02:00
taskain7andArnold Gálovics 8a1f134881 [FINERACT-1678] Loan COB job skeleton 2022-08-17 08:37:00 +02:00
Arnold GalovicsandAleksandar Vidakovic f06d9f670c ScheduleStopListener threading fix 2022-08-16 18:48:54 +02:00
Adam SaghyandArnold Gálovics 8e4c4d7c5c Rework datatable entry handling + added additional tests 2022-08-15 21:24:40 +02:00
Renovate BotandArnold Gálovics f50f5700b5 fix(deps): update dependency org.mariadb.jdbc:mariadb-java-client to v3 2022-08-15 14:59:03 +02:00
Adam SaghyandArnold Gálovics fff090166c Add missing maxOutstandingLoanBalance field to swagger 2022-08-15 14:54:10 +02:00
Renovate BotandArnold Gálovics 29f2070bc6 chore(deps): update all non-major dependencies docker tags 2022-08-15 11:37:12 +02:00
Adam SaghyandArnold Gálovics 629b9f6d7c FINERACT-1670: Rework command source to store dates in UTC 2022-08-12 09:55:30 +02:00
Adam SaghyandArnold Gálovics d5ca6baab3 FINERACt-1670: Fix fetching datetime in native queries 2022-08-11 19:22:52 +02:00
bd404e8c7b Fix to accept Loan Charge amounts using locales (#2393)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
2022-08-10 13:31:19 -05:00
13d587a951 Allow disbursementDataArray empty instead of null (#2499)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
2022-08-10 12:28:16 -05:00
Adam SaghyandAleksandar Vidakovic eea635e90a Spotless apply 2022-08-09 10:42:21 +02:00
Adam SaghyandAleksandar Vidakovic 656ecdef9f FINERACT-1670: Add auditable fields to Calendar 2022-08-09 10:42:21 +02:00
Adam SaghyandAleksandar Vidakovic e47e2cd1e3 FINERACT-1670: Add auditable fields to Note 2022-08-09 10:42:21 +02:00
Adam SaghyandAleksandar Vidakovic 4029464e32 FINERACT-1670: Add auditable fields to Loan Repayment Schedule installment and history 2022-08-09 10:42:21 +02:00
Adam SaghyandAleksandar Vidakovic cad37ed956 FINERACT-1670: Add some missing indexes 2022-08-09 10:42:21 +02:00
Adam SaghyandAleksandar Vidakovic 6e189fcc89 FINERACT-1670: Add auditable fields to Client identifier 2022-08-09 10:42:21 +02:00
Adam SaghyandAleksandar Vidakovic 5df284aad1 FINERACT-1670: Add auditable fields to Business date 2022-08-09 10:42:21 +02:00
taskain7andAleksandar Vidakovic 47d5a85f17 [FINERACT-1678] configuration validation for COBs 2022-08-09 09:30:37 +02:00
9e949887b9 Delinquency buckets management for Loans (#2442)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
2022-08-08 14:16:09 -05:00
Adam SaghyandAleksandar Vidakovic f78a596878 FINERACT-1681: Fix filtering 2022-08-08 16:50:10 +02:00
John WoodlockandAleksandar Vidakovic 4034f4ae19 FINERACT-1675 New Paid loanCharge Refund Transaction 2022-08-08 11:45:05 +02:00
Adam SaghyandAleksandar Vidakovic 6f39c8ffed FINERACT-1682: Fix job key refresh logic for inactive schedulers 2022-08-08 11:43:33 +02:00
Adam SaghyandArnold Gálovics 7b55951a3a FINERACT-1681: Filter Journal entry by submitted on date 2022-08-05 13:54:05 +02:00
4685e96c81 FINERACT-1668: Adding Configuration for reversal transaction (#2454)
Co-authored-by: Dhaval Maniyar <dhavalmaniyar@Dhavals-MacBook-Pro.local>
2022-08-05 16:36:40 +05:30
Jose Alberto HernandezandArnold Gálovics e15459c659 Datatables datetime fields management 2022-08-04 15:56:59 +02:00
Adam SaghyandArnold Gálovics 865b9efc6e FINERACT-1670: Add UTC auditable fields and submitted on date to Journal Entry 2022-08-04 14:27:18 +02:00
Adam SaghyandArnold Gálovics 77ca3a2ce0 Fix race condition of CustomAuditingHandler's DateTimeProvider 2022-08-04 14:24:38 +02:00
Adam SaghyandArnold Gálovics 79180506b6 Fix OffsetDateTime fetch from DB 2022-08-04 14:23:59 +02:00
Adam SaghyandArnold Gálovics 69083de949 Fix floating rate and floating rate period native queries 2022-08-04 14:23:59 +02:00
Aleksandar Vidakovic 251b125f83 FINERACT-1679: Merge changes from release 1.7.0 2022-08-03 20:50:34 +02:00
Jose Alberto HernandezandArnold Gálovics cabb79c992 Allow accounting mappings for fund source asset or liability 2022-08-02 13:25:02 +02:00
Arnold GalovicsandArnold Gálovics c46864c8c9 Fix for scheduled Spring Batch jobs 2022-08-02 12:01:07 +02:00
Renovate BotandArnold Gálovics 5dab0127d8 chore(deps): pin actions/upload-artifact action to 3cea537 2022-08-01 21:30:11 +02:00
Renovate BotandArnold Gálovics 7f703a3ee9 fix(deps): update non-major 2022-08-01 18:41:53 +02:00
Adam SaghyandArnold Gálovics 65c6b18ed1 Fix inconsistenant Date and Date time handling 2022-08-01 15:47:47 +02:00
Adam SaghyandArnold Gálovics 7fb61d028e Fix transaction cannot be in future check 2022-08-01 07:25:13 +02:00
Adam SaghyandArnold Gálovics a73c593eb8 Fix transaction cannot be in future check 2022-08-01 07:25:13 +02:00
Adam SaghyandAleksandar Vidakovic 6a0928eb95 Rework custom auditing handler 2022-07-31 03:50:42 +02:00
Arnold GalovicsandArnold Gálovics 87204d5a8a Added reschedule loans api resource to Fineract Client and batch; minor swagger polishing 2022-07-29 20:36:58 +02:00
taskain7andArnold Gálovics b21cdf59b1 [FINERACT-1676] fixing saving dormant account job 2022-07-29 15:15:25 +02:00
Jose Alberto HernandezandArnold Gálovics 81601645a4 Fix Product Mix queries using group by 2022-07-29 10:15:13 +02:00
Arnold GalovicsandArnold Gálovics dc5abeacb9 Added archiving test results and server logs on GitHub workflows 2022-07-28 20:08:25 +02:00
taskain7andArnold Gálovics 16ab491120 [FINERACT-1669] Store business step configuration 2022-07-28 15:24:46 +02:00
taskain7andArnold Gálovics ff9181cc47 [FINERACT-1667] Introducing Spring Batch as job runner engine 2022-07-28 12:45:01 +02:00
dependabot[bot]andArnold Gálovics d03044c48b chore(deps): bump actions/stale from 5.1.0 to 5.1.1
Bumps [actions/stale](https://github.com/actions/stale) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/532554b8a8498a0e006fbcde824b048728c4178f...9c1b1c6e115ca2af09755448e0dbba24e5061cc8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-28 11:07:53 +02:00
logoutdhavalandGitHub a80f589ad4 fineract-1646 and fineract-1638 combined fix (#2457)
authored-by: Dhaval Maniyar <dhavalmaniyar@Dhavals-MacBook-Pro.local>
2022-07-28 14:00:15 +05:30
dependabot[bot]andArnold Gálovics 0b334b563e chore(deps): bump actions/stale from 5.0.0 to 5.1.0
Bumps [actions/stale](https://github.com/actions/stale) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/3cc123766321e9f15a6676375c154ccffb12a358...532554b8a8498a0e006fbcde824b048728c4178f)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-26 11:06:28 +02:00
Adam SaghyandArnold Gálovics 700038020e Apply fixes (based on review) 2022-07-26 09:56:30 +02:00
Adam SaghyandArnold Gálovics 25823a9377 Fix some tests 2022-07-26 09:56:30 +02:00
Adam SaghyandArnold Gálovics 35cc1fc0d6 Refactor Loan Transaction to support auditable fields 2022-07-26 09:56:30 +02:00
Adam SaghyandArnold Gálovics 176c5700d0 Refactor Loan to support auditable fields 2022-07-26 09:56:30 +02:00
Adam SaghyandArnold Gálovics d8f483ab45 Refactor Client to support auditable fields 2022-07-26 09:56:30 +02:00
Adam SaghyandArnold Gálovics b8f8217148 Add CustomAuditHandler for supporting OffsetDateTime and store in UTC 2022-07-26 09:56:30 +02:00
Hemant GuptaandArnold Gálovics da920b1824 refactor: add lombok to closure module 2022-07-25 15:39:25 +02:00
Hemant GuptaandArnold Gálovics d6f8ef8b74 fix: final class error 2022-07-25 11:31:07 +02:00
Hemant GuptaandArnold Gálovics 4dada53f8d refactor: add lombok to FinancialActivityAccount module 2022-07-25 11:31:07 +02:00
Wilfred KigenyiandArnold Gálovics a555fe63bc Fix applyAdditionalShares
Use saveAndFlush instead of save on ShareAccountRepository
2022-07-25 08:44:29 +02:00
Renovate BotandArnold Gálovics 0187dc5e5c fix(deps): update dependency org.apache.tomcat:tomcat to v9.0.65 2022-07-25 08:43:55 +02:00
Renovate BotandArnold Gálovics fb15fe1806 chore(deps): update actions/stale digest to 3cc1237 2022-07-25 07:52:09 +02:00
Adam SaghyandArnold Gálovics ba75f7b93b Fix general ledger report 2022-07-24 21:43:30 +02:00
d388a3aa35 fix for 1665 and 1666 (#2441)
Co-authored-by: Dhaval Maniyar <dhavalmaniyar@Dhavals-MacBook-Pro.local>
2022-07-24 01:19:54 +05:30
019cdab434 Fineract-1646 (#2440)
* FINERACT 1646

* updated the order of import

Co-authored-by: Manoj <56669674+fynmanoj@users.noreply.github.com>
2022-07-23 01:07:42 +05:30
Adam SaghyandArnold Gálovics a236d7e910 Fix job mismatched logic 2022-07-21 18:21:32 +02:00
Adam SaghyandArnold Gálovics 2290886e8d Activation date cannot be earlier than the submitted on date 2022-07-18 11:01:01 +02:00
Renovate BotandArnold Gálovics 801497fa23 chore(deps): update all non-major dependencies 2022-07-18 11:00:47 +02:00
dependabot[bot]andArnold Gálovics 8ca0650b92 chore(deps): bump actions/stale from 5.0.0 to 5.1.0
Bumps [actions/stale](https://github.com/actions/stale) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/3cc123766321e9f15a6676375c154ccffb12a358...532554b8a8498a0e006fbcde824b048728c4178f)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-18 10:13:59 +02:00
rrpawar96andArnold Gálovics e4e5fc0ceb FINERACT-1658:GroupFilter_In_Center 2022-07-17 18:41:19 +02:00
Arnold GalovicsandArnold Gálovics c2d5a735d6 Fineract client builder tenant and username/password are made optional 2022-07-15 18:13:02 +02:00
dependabot[bot]andArnold Gálovics b87d915dbc chore(deps): bump actions/setup-node from 3.4.0 to 3.4.1
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/5b949b50c3461bbcd5a540b150c368278160234a...2fddd8803e2f5c9604345a0b591c3020ee971a93)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-15 14:40:54 +02:00
Adam SaghyandArnold Gálovics 81be863739 Quick code cleaning for client and loan: around the native queries 2022-07-15 13:15:19 +02:00
Arnold GalovicsandArnold Gálovics 8c023e74a8 Batch API extensions and a couple of OpenAPI fixes + minor datatable fixes 2022-07-13 21:50:42 +02:00
Arnold GalovicsandArnold Gálovics 4f832f9481 Correlation ID support implementation 2022-07-13 21:29:55 +02:00
Vic RomeroandArnold Gálovics 8a55d5807a FINERACT-1656 Correlation ID propagation and configuration 2022-07-13 21:29:55 +02:00
Adam SaghyandArnold Gálovics 1db8ef46fc Date to LocalDate (scheduler excluded due to quartz) 2022-07-13 12:16:07 +02:00
dependabot[bot]andArnold Gálovics f7e21f8db1 chore(deps): bump actions/setup-java from 3.4.0 to 3.4.1
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/16cca5479d7c6b6843f6a6515640ba33c6501543...2c7a4878f5d120bd643426d54ae1209b29cc01a3)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-12 11:09:09 +02:00
dependabot[bot]andArnold Gálovics 8b08542083 chore(deps): bump actions/setup-node from 3.3.0 to 3.4.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/eeb10cff27034e7acf239c5d29f62154018672fd...5b949b50c3461bbcd5a540b150c368278160234a)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-12 11:08:59 +02:00
rrpawar96andArnold Gálovics 308ede861c FINERACT-1402:PaymentTypeMandatory 2022-07-11 17:54:29 +02:00
Adam SaghyandArnold Gálovics a765cb00f1 Fix typo in error messages in Loan 2022-07-11 17:53:54 +02:00
Adam SaghyandArnold Gálovics 7ce19d703b Date to LocalDate - Client 2022-07-11 13:22:09 +02:00
Adam SaghyandArnold Gálovics ef96d5cc50 Date to LocalDate - part 1 2022-07-11 11:22:47 +02:00
Jose Alberto HernandezandArnold Gálovics adaac89583 Fix makerchecker inbox list group by error 2022-07-11 10:09:28 +02:00
Jose Alberto HernandezandArnold Gálovics 4ebe645c58 Charts data is mandatory for creating a fixed deposit product 2022-07-11 10:07:59 +02:00
Renovate BotandArnold Gálovics 4fdee75beb chore(deps): update all non-major dependencies 2022-07-11 10:06:22 +02:00
ManojandGitHub d1c77a5e46 Merge pull request #2396 from logoutdhaval/fineract-1652
fineract-1652: Account Balance and Transaction running balance is wrong
2022-07-10 23:19:24 +05:30
Dhaval Maniyar e4eb8afdf4 fineract-1652: Account Balance and Transaction running balance is wrong 2022-07-10 18:29:02 +05:30
John WoodlockandArnold Gálovics 16aafdf95b FINERACT-1657 Allow schedule approved/submitted multi non-tranche loans 2022-07-08 14:45:10 +02:00
John WoodlockandArnold Gálovics 0487bece0b FINERACT-1661 Allow merchant_issued and payout refunds when fullyPaid/Overpaid 2022-07-08 14:44:45 +02:00
Adam SaghyandArnold Gálovics 2bb92ae539 Business date response swagger fix 2022-07-08 14:37:06 +02:00
Arnold GalovicsandArnold Gálovics e50a329756 Business step implementation and interface for Loan COB 2022-07-07 20:50:50 +02:00
peter-kovacs-dpcandGitHub fe8868b509 Scheduler jobs API rename (#2409)
SchedulerJobApiResource tag renamed to scheduler jobs
2022-07-07 19:09:58 +02:00
Adam SaghyandArnold Gálovics b30d5c5a16 Loan transaction date handling enhancement + Make Loan transaction auditable 2022-07-07 15:56:43 +02:00
Adam SaghyandArnold Gálovics ad4fa563de Auditor fix - Detached Auditor entity was not persisted during cascade persisting 2022-07-07 13:56:34 +02:00
ManojandGitHub 83dcc4413b Merge pull request #2404 from logoutdhaval/pentaho-to-table-branch
FINERACT-1541: Pentaho reports converted to table format
2022-07-06 13:42:47 +05:30
logoutdhaval e90dd49c81 FINERACT-1541: Pentaho reports converted to table format 2022-07-05 14:34:28 +05:30
Adam SaghyandArnold Gálovics b44a2f2b14 Business date - part 3: Fix reports 2022-07-04 17:35:53 +02:00
Jose Alberto HernandezandArnold Gálovics 357062a186 Loan externalId unique validation 2022-07-04 15:55:05 +02:00
Jose Alberto HernandezandArnold Gálovics 2d07e8c867 Fix for JPA getById method deprecation 2022-07-04 09:28:32 +02:00
Renovate BotandArnold Gálovics 2e0fe6aa90 chore(deps): update all non-major dependencies 2022-07-03 22:12:17 +02:00
Jose Alberto HernandezandArnold Gálovics b9e30e2e82 Fix for Fixed Deposit Integration Test 2022-07-03 21:34:34 +02:00
Arnold GalovicsandArnold Gálovics ac17e993b6 Build fix 2022-07-01 16:56:56 +02:00
peter-kovacs-dpcandGitHub c5b12c489c swagger schema extended (#2397)
swagger schema extended
2022-07-01 16:43:17 +02:00
Arnold GalovicsandArnold Gálovics 0bbcc72513 Renovate fixes for upcoming dep upgrade 2022-07-01 10:30:02 +02:00
Adam SaghyandArnold Gálovics 05dc8f9380 Error logging enhancement - log handled exceptions on WARN level 2022-07-01 08:46:15 +02:00
Jose Alberto HernandezandArnold Gálovics 9c8239a9b1 Implement integration tests for Accounting rules 2022-06-29 15:57:16 +02:00
Adam SaghyandGitHub 632a08a5ce Business date - part 2 (#2384)
Business date - part 2
2022-06-29 15:56:31 +02:00
Adam SaghyandGitHub 63a3f56dd1 Business date part 1 fix (#2391)
* Business date - part 1 - Fix swagger
2022-06-29 13:09:46 +02:00
Adam SaghyandArnold Gálovics 1de7b23c9a Business date - part 1 - Fix swagger 2022-06-29 11:25:45 +02:00
Arnold GalovicsandAleksandar Vidakovic 62689eb674 OpenAPI fix for loans 2022-06-28 19:19:27 +02:00
Arnold GalovicsandAleksandar Vidakovic 94924432a9 Fixing loan approval open api definition 2022-06-28 16:18:36 +02:00
taskain7andArnold Gálovics ffb9147770 New Instance type: Batch Manager 2022-06-28 15:32:17 +02:00
Arnold GalovicsandAleksandar Vidakovic 67850e3889 Fixing loan approval open api definition 2022-06-28 14:45:36 +02:00
ManojandGitHub 0d5bace36e Merge pull request #2382 from logoutdhaval/fineract-1649
Fineract-1649: Error for Journal entry table
2022-06-28 13:59:23 +05:30
Dhaval Maniyar 5524949741 Fineract-1649: Error for Journal entry table 2022-06-27 21:42:28 +05:30
Jose Alberto HernandezandArnold Gálovics 55949bf8b0 Unstable integration test due different timezones 2022-06-27 09:27:07 +02:00
ManojandGitHub 7e680729fc Merge pull request #2379 from logoutdhaval/fineract-1645
FINERACT-1645:Invalid Balance after Interest posting with withdrawal fee
2022-06-25 14:40:53 +05:30
ManojandGitHub 74e43ab623 Merge pull request #2372 from logoutdhaval/fineract-1642
FINERACT-1642: Bulk reversal of related Transactions
2022-06-24 21:58:01 +05:30
Dhaval Maniyar 44e1e44785 FINERACT-1645:Invalid Balance after Interest posting with withdrawal fee 2022-06-24 18:51:32 +05:30
Dhaval Maniyar ff2e6cf4af FINERACT-1642:Bulk reversal of related Transactions 2022-06-24 16:29:31 +05:30
Arnold GalovicsandArnold Gálovics f98681ffdd Putting back support for pre business events 2022-06-23 17:59:57 +02:00
ManojandGitHub 3f02b7d7b5 Merge pull request #2374 from logoutdhaval/fineract-1644
FINERACT:1644:Max Heap Space should be Configurable for Docker Image
2022-06-23 19:49:39 +05:30
Arnold GalovicsandArnold Gálovics cd38262152 Refactored business events 2022-06-23 13:04:43 +02:00
Jose Alberto HernandezandArnold Gálovics ddc6a76689 Integration tests for auditing and loan templating 2022-06-22 14:46:48 +02:00
Jose Alberto HernandezandArnold Gálovics 470ff9a745 Specify query parameters for LoanTransactionsApi retrieveTransaction 2022-06-22 14:43:58 +02:00
Jose Alberto HernandezandArnold Gálovics fb0556c20e Specify query parameters for LoansApi retrieveLoan 2022-06-22 14:41:52 +02:00
taskain7andArnold Gálovics ba1fddbc51 [FINERACT-1628] remove update loan paidin advance job and table 2022-06-22 11:25:09 +02:00
Jose Alberto HernandezandArnold Gálovics fb473ad8d4 Specify query parameter for DatatablesApi getDatatableManyEntry 2022-06-22 11:24:08 +02:00
dependabot[bot]andArnold Gálovics 1fb15fa4b6 chore(deps): bump actions/setup-java from 3.3.0 to 3.4.0
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/860f60056505705214d223b91ed7a30f173f6142...16cca5479d7c6b6843f6a6515640ba33c6501543)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 11:23:17 +02:00
Arnold GalovicsandArnold Gálovics 23b56fef67 Fixing submittedOnDate as a String in openAPI definition for PostLoansRequest 2022-06-22 10:58:17 +02:00
Dhaval Maniyar e3a256cb51 FINERACT:1644:Max Heap Space should be Configurable for Docker Image 2022-06-21 17:08:28 +05:30
John WoodlockandArnold Gálovics 149279c1fc FINERACT-1643 Catch external_id duplicates for loan transactions 2022-06-20 17:11:17 +02:00
Michael Vorburger ⛑️ 15fff1fb3a Delete fineract.dev.yaml (for now, may be restored again later)
Due to https://github.com/vorburger/www.fineract.dev/issues/15, which I still haven't sorted out yet, this action, despite been green on https://github.com/apache/fineract/actions/workflows/fineract.dev.yaml, currently actually does NOT update https://www.fineract.dev anymore. The only thing this has been doing for the past 6 months is it keeps sending me GCP notification about GCB failures... ;-) Let's therefore remove this? I'll propose reverting this removal when / if I get around to fixing https://github.com/vorburger/www.fineract.dev/issues/15.
2022-06-17 16:58:01 +02:00
ManojandGitHub 2a79a7ed28 Merge pull request #2353 from logoutdhaval/fineract-1634
FINERACT-1634: Invalid balance after withdrawal correction
2022-06-17 15:42:06 +05:30
percyashuandArnold Gálovics 645994f870 FINERACT-1483: Optional value should accessed and throw exception if null 2022-06-16 09:20:18 +02:00
Arnold GalovicsandArnold Gálovics 68fcddf7a7 Fix for Gradle logging on asciidoc and swagger generation 2022-06-16 09:19:06 +02:00
Adam SaghyandArnold Gálovics 3196de0e4d Business date doc 2022-06-15 16:42:55 +02:00
Adam SaghyandArnold Gálovics 38e5edc939 Business date - doc 2022-06-15 16:42:55 +02:00
Dhaval ManiyarandArnold Gálovics 8fc99a8146 FINERACT-1641: Invalid Date of transaction after reversal correction 2022-06-15 15:48:41 +02:00
Arnold GalovicsandArnold Gálovics 78280aab98 Allow headers to be passed for generated fineract client APIs 2022-06-15 11:37:48 +02:00
Adam SaghyandGitHub 4465e632f1 Business date part 1 (#2362)
Business date implementation - part 1
2022-06-14 19:05:52 +02:00
Jose Alberto HernandezandArnold Gálovics a38fc32315 Disable receiving events for batch-only instances 2022-06-14 09:47:44 +02:00
Arnold GalovicsandArnold Gálovics 79375a8b91 Renovate adjustments 2022-06-14 09:15:29 +02:00
Arnold GalovicsandArnold Gálovics e9df96e387 Readonly connection support 2022-06-14 09:15:12 +02:00
Jose Alberto HernandezandArnold Gálovics 2a7d8b9496 Fineract with ReadOnly tenant database connection 2022-06-14 09:15:12 +02:00
Renovate BotandArnold Gálovics 7cd9ff879a chore(deps): pin dependencies 2022-06-13 18:32:32 +02:00
Renovate BotandArnold Gálovics fe500be8ca chore(deps): update dependency jakarta.activation:jakarta.activation-api to v2 2022-06-13 18:27:19 +02:00
Renovate BotandArnold Gálovics 6a4b17a80f chore(deps): update plugin org.openapi.generator to v6 2022-06-13 18:15:29 +02:00
Jose Alberto HernandezandArnold Gálovics 2b122a17ea Fix for reading multirow datatable entry reads non-belonging entry 2022-06-13 18:13:23 +02:00
Dhaval Maniyar 49e67a01c8 FINERACT-1634: Invalid balance after withdrawal correction 2022-06-13 20:39:35 +05:30
Adam SaghyandArnold Gálovics 8e37f93baf Remove FK of job_run_history table 2022-06-08 14:35:56 +02:00
Arnold GalovicsandArnold Gálovics ef2d42fe32 Instance type filter polishing and tests 2022-06-06 13:59:11 +02:00
temi-roandGitHub 367321d76d Fix NullPointerException at Base64$Encoder in ImagesApiResource (FINERACT-1224) 2022-06-03 17:50:37 +02:00
Jose HernandezandArnold Gálovics ebf0e8b539 Filter for instances read, write, batch 2022-06-02 21:39:13 +02:00
Jose Alberto HernandezandArnold Gálovics ee1f988be6 Enable/Disable Messaging in Read Only instance mode 2022-05-31 21:52:50 +02:00
Arnold GalovicsandArnold Gálovics 89a4db47cc Reorganizing business events 2022-05-31 21:51:57 +02:00
taskain7andArnold Gálovics e7b2d6dff5 remove unused jobs 2022-05-31 21:49:39 +02:00
John WoodlockandArnold Gálovics a5bfa43dad FINERACT-1557 (approval removing installment charges) 2022-05-30 10:58:19 +02:00
Manoj VMandArnold Gálovics 264cc3a299 FINERACT-1553-fix-boolean-premitive-to-handle-null 2022-05-27 13:33:11 +02:00
ManojandGitHub 18a44d7613 Merge pull request #2336 from logoutdhaval/fineract-1613
FINERACT-1613:Savings Interest Posting Job
2022-05-27 15:39:32 +05:30
Arnold GalovicsandAleksandar Vidakovic 2e8f018132 Static weaving classpath is tuned to conform with the system dependent path separator 2022-05-27 12:01:53 +02:00
logoutdhaval f576c3f07f FINERACT-1613:Savings Interest Posting Job 2022-05-27 13:39:25 +05:30
Jose Alberto HernandezandArnold Gálovics e277c85c69 Fix in accounting rule system_defined 2022-05-26 22:11:00 +02:00
Jose Alberto HernandezandArnold Gálovics 5942488bde Fix for queries using postgres 2022-05-26 12:01:27 +02:00
NaveenandAleksandar Vidakovic 69a900492c chore: renovate bot setting to pin actions to a full length commit SHA
- https://docs.renovatebot.com/modules/manager/github-actions/#additional-information

- Pinned actions by SHA https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies

>Pin actions to a full length commit SHA

>Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
> Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository,
> as they would need to generate a SHA-1 collision for a valid Git object payload.

- https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions
- https://github.com/renovatebot/.github/blob/b0c3aa85ef2bb242580f20b02b380ca532b4ce17/default.json#L13
2022-05-20 19:31:21 +02:00
Jose Alberto HernandezandArnold Gálovics 64bfe33766 Datatable integration test 2022-05-20 15:01:14 +02:00
Arnold GalovicsandArnold Gálovics 6849f45bb8 Deleting the topics module since its incomplete and additional cleanups 2022-05-19 18:39:44 +02:00
Arnold GalovicsandAleksandar Vidakovic 073b1b04b6 Cleanup around Hooks and Hook templates 2022-05-17 23:58:12 +02:00
Arnold GalovicsandArnold Gálovics 2bb6445b4b Spring Batch documentation + Loan COB 2022-05-17 15:57:03 +02:00
John WoodlockandArnold Gálovics e999959829 FINERACT-1596 Goodwill Accounting Changes 2022-05-16 18:57:55 +02:00
John WoodlockandArnold Gálovics c1a3b98edd Update: Cater for loans with no schedule at disburse time 2022-05-16 18:56:25 +02:00
John WoodlockandArnold Gálovics 66621dcc81 FINERACT-1618 Cater for loans with no schedule at disburse time 2022-05-12 13:14:19 +02:00
Arnold GalovicsandArnold Gálovics 77fd4ff4c1 Fine tuning the batch APIs and minor adjustments 2022-05-12 11:04:01 +02:00
taskain7andArnold Gálovics a89fe53937 FINERACT-1471: AsciiDoc extension for read/write/batch separation 2022-05-12 10:08:03 +02:00
Aleksandar Vidakovic b42423b941 Last minute release plugin fixes 2022-05-11 16:38:29 +02:00
Aleksandar Vidakovic 555240c094 FINERACT-1607: Improve documentation on Cucumber usage 2022-05-11 14:12:41 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 235dfa8738 FINERACT-1607: Improve documentation on Cucumber usage 2022-05-11 14:07:07 +02:00
ManojandGitHub 3827417a6f Merge pull request #2322 from apurbraj/develop
Post Interest for Savings Job Fix
2022-05-10 22:47:31 +05:30
apurbraj a97a3d0402 FINERACT-1603- Post Interest Job Fix 2022-05-10 21:20:35 +05:30
Aleksandar Vidakovic 6111e69329 FINERACT-1608: Add introduction to Asciidoc 2022-05-10 12:24:40 +02:00
Aleksandar VidakovicandAleksandar Vidakovic b0a261cbd5 FINERACT-1608: Add introduction to Asciidoc 2022-05-10 12:12:57 +02:00
John WoodlockandAleksandar Vidakovic 7f11d815d9 FINERACT-1557 enable previous disabled refundByCash accounting tests 2022-05-09 17:52:01 +02:00
John WoodlockandArnold Gálovics a3ab06593f FINERACT-1557 enable previous disabled refundByCash accounting tests 2022-05-09 15:55:25 +02:00
taskain7andArnold Gálovics 665bd0f6fb FINERACT-1483: fix Sonar vulnerabilities with Minor severity 2022-05-09 14:42:22 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 9696a7e905 FINERACT-1615: Fix jakarta mail related dependency issue 2022-05-06 17:07:11 +02:00
Arnold GalovicsandArnold Gálovics 9d4d848df5 Fixes to support MySQL 8 due to specific reserved keywords 2022-05-06 09:38:26 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 6aa668a5f5 FINERACT-1470-2: Build issues 2022-05-06 08:46:24 +02:00
Aleksandar VidakovicandAleksandar Vidakovic decedc52f8 FINERACT-1470-fix: Fix Sonar configuration 2022-05-04 15:33:56 +02:00
John WoodlockandAleksandar Vidakovic c2be3d9b4b FINERACT-1596 New Merchant Issued and Payout Refunds and Goodwill Credit Transactions 2022-05-04 15:13:30 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 40eb547a5c FINERACT-1470: Fineract release plugin 2022-05-04 15:11:53 +02:00
Arnold GalovicsandArnold Gálovics b185937962 Sonar test 2022-05-02 14:32:20 +02:00
Aleksandar VidakovicandArnold Gálovics 4bef3ba6b8 FINERACT-1528: Replace copy and pasted Swagger UI with Springdoc 2022-05-02 14:30:49 +02:00
John WoodlockandArnold Gálovics 3bc160c33c FINERACT-1604 fIX - Loan Account Details page not working 2022-04-29 15:21:38 +02:00
John WoodlockandAleksandar Vidakovic a33c8f9439 FINERACT-1573 Credit Balance Refund - cater for cash accounting 2022-04-28 12:16:22 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 38ff5dada3 FINERACT-1594: Create setenv.sh file for Tomcat installations 2022-04-28 05:55:18 +02:00
taskain7andArnold Gálovics 136ef55519 FINERACT-1483: fix //NOSONAR positions 2022-04-27 16:18:47 +02:00
taskain7andArnold Gálovics 56d14a1d69 FINERACT-1571: Allow Liquibase data migration for write instances only 2022-04-27 16:18:29 +02:00
Jose HernandezandArnold Gálovics e3e4dbeb8a Backward compatibility with CodeLookUp 2022-04-26 19:09:05 +02:00
Manoj VMandArnold Gálovics 6d4e731ff9 FINERACT-1449-Loan-advance-payment-issue-fix 2022-04-26 15:37:03 +02:00
Arnold GalovicsandArnold Gálovics 9d212ba471 FINERACT-1593: Bugfixes for Client Address creation 2022-04-26 13:48:23 +02:00
John WoodlockandArnold Gálovics df5718ad04 FINERACT-1573 swagger updates 2022-04-25 16:39:36 +02:00
Renovate BotandPetri Tuomola 9cc7f0e637 chore(deps): update all non-major dependencies 2022-04-23 17:06:06 +08:00
Petri TuomolaandAleksandar Vidakovic a9feedbdf0 Moving SonarCloud to GitHub Actions 2022-04-23 09:36:04 +02:00
Jose HernandezandArnold Gálovics 6fcf8ad861 Fix for supporting numeric postgres data type in datatables 2022-04-22 08:39:45 +02:00
naveensrinivasanandAleksandar Vidakovic e088e4d70d chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
2022-04-21 13:46:58 +02:00
taskain7andArnold Gálovics 5980487d89 FINERACT-1571: introducing environment variables for read/write/batch separation 2022-04-20 13:16:41 +02:00
John WoodlockandArnold Gálovics d1168833cc Credit Balance Refund loan transaction 2022-04-19 10:04:16 +02:00
Jose HernandezandAleksandar Vidakovic 3d3e8c4083 Fixes integration tests
FINERACT-1557: Fixes for integration tests

FINERACT-1557: Fixes for integration tests

Fixes integration tests
2022-04-14 00:37:55 +02:00
taskain7andArnold Gálovics eb11c32ee3 FINERACT-1483: fix Sonar Security Hotspots 2022-04-11 17:44:05 +02:00
Arnold GalovicsandArnold Gálovics ce6a1fcafd Fixed a lot of up-to-date Gradle checks to speed up integration test running 2022-04-09 13:24:12 +02:00
Arnold GalovicsandArnold Gálovics ab80cc0477 Lombok refactoring continued 2022-04-09 13:23:57 +02:00
Arnold GalovicsandArnold Gálovics ddd97f274e Sonarqube quickfix 2022-04-09 12:55:36 +02:00
Arnold GalovicsandArnold Gálovics bb514443ce Lombok introduction 2022-04-08 16:00:53 +02:00
Arnold GalovicsandAleksandar Vidakovic e009158d7d Copy & remove only persistence.xml during static weaving instead of full META-INF 2022-04-08 14:08:08 +02:00
taskain7andArnold Gálovics f22807b944 FINERACT-1483: fixing Sonar vulnerabilities with Blocker and Critical severity 2022-04-07 11:10:38 +02:00
Arnold GalovicsandAleksandar Vidakovic 44e6d369e5 FINERACT-1562: Excluding persistence.xml from being picked up by Spring 2022-04-07 06:05:09 +02:00
ManojandGitHub 61536332a3 Merge pull request #2215 from logoutdhaval/fineract-1553
FINERACT-1553: Lien configured at product level
2022-04-06 19:15:03 +05:30
logoutdhaval 52063fc354 FINERACT-1553: Lien added 2022-04-06 16:48:45 +05:30
Vic RomeroandAleksandar Vidakovic 4648a96a35 Configuring SonarQube using only the sonarqube.yml file
Configuring SonarQube using only the sonarqube.yml file

Configuring SonarQube using only the sonarqube.yml file

Configuring SonarQube using only the sonarqube.yml file

Configuring SonarQube using only the sonarqube.yml file

Configuring SonarQube using only the sonarqube.yml file

Configuring SonarQube using only the sonarqube.yml file

Configuring SonarQube using only the sonarqube.yml file

Changes have been done for making the GitHub actions flexible to push changes to the upstream Apache Fineract
2022-04-05 17:15:01 +02:00
Aleksandar VidakovicandAleksandar Vidakovic cb87c9f550 Use 'renovate' for aggregated dependency upgrades (update) 2022-04-05 17:11:39 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 35c835f4b5 Use 'renovate' for aggregated dependency upgrades 2022-04-05 15:52:44 +02:00
dependabot[bot]andAleksandar Vidakovic f17ef1e9a9 chore(deps): bump swagger-core from 1.6.5 to 1.6.6
Bumps [swagger-core](https://github.com/swagger-api/swagger-core) from 1.6.5 to 1.6.6.
- [Release notes](https://github.com/swagger-api/swagger-core/releases)
- [Commits](https://github.com/swagger-api/swagger-core/compare/v1.6.5...v1.6.6)

---
updated-dependencies:
- dependency-name: io.swagger:swagger-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 14:54:59 +02:00
Renovate BotandAleksandar Vidakovic 25431a5e53 chore(deps): update dependency io.swagger.core.v3:swagger-annotations to v2.2.0 2022-04-05 14:52:59 +02:00
Renovate BotandAleksandar Vidakovic 03920c8448 chore(deps): update dependency io.swagger:swagger-annotations to v1.6.6 2022-04-05 14:52:25 +02:00
rrpawar96andArnold Gálovics 9329b99185 FINERACT-130:AccountHold 2022-04-04 15:50:54 +02:00
Renovate BotandAleksandar Vidakovic e65d896c38 chore(deps): update dependency com.icegreen:greenmail-junit5 to v1.6.8 2022-04-03 21:24:07 +02:00
Renovate BotandAleksandar Vidakovic 8721b00b2a chore(deps): update dependency org.mock-server:mockserver-junit-jupiter to v5.13.1 2022-04-02 22:00:04 +02:00
Renovate BotandAleksandar Vidakovic 079158f4b0 chore(deps): update dependency org.jetbrains.kotlin:kotlin-bom to v1.6.20 2022-04-02 08:45:14 +02:00
dependabot[bot]andAleksandar Vidakovic 2682a349cb chore(deps): bump spring-framework-bom from 5.3.17 to 5.3.18
Bumps [spring-framework-bom](https://github.com/spring-projects/spring-framework) from 5.3.17 to 5.3.18.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.17...v5.3.18)

---
updated-dependencies:
- dependency-name: org.springframework:spring-framework-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-02 08:40:41 +02:00
Renovate BotandPetri Tuomola 80b6721bd5 chore(deps): update dependency gradle to v7.4.2 2022-04-02 14:04:10 +08:00
Renovate BotandPetri Tuomola 23610b4a8a chore(deps): update spring boot to v2.6.6 2022-04-02 14:03:19 +08:00
Renovate BotandPetri Tuomola d2e6446df1 chore(deps): update dependency com.amazonaws:aws-java-sdk-s3 to v1.12.191 2022-04-02 14:02:57 +08:00
Renovate BotandPetri Tuomola a6c555b690 chore(deps): update dependency org.apache.tomcat:tomcat to v9.0.62 2022-04-02 14:02:30 +08:00
Renovate BotandPetri Tuomola 841b57a834 chore(deps): update dependency org.webjars.npm:swagger-ui-dist to v4.10.3 2022-04-02 14:02:05 +08:00
dependabot[bot]andAleksandar Vidakovic 250aee65c8 chore(deps): bump aws-java-sdk-s3 from 1.12.188 to 1.12.189
Bumps [aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.188 to 1.12.189.
- [Release notes](https://github.com/aws/aws-sdk-java/releases)
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.188...1.12.189)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-31 11:03:04 +02:00
Arnold GalovicsandAleksandar Vidakovic d67dbece35 PostgreSQL Docker permission fix on non-Windows machines 2022-03-31 11:00:13 +02:00
Aleksandar VidakovicandAleksandar Vidakovic cf177a0bd4 FINERACT-1552: Upgrade fineract-client to OpenAPI generator 5.4.0 2022-03-31 10:53:03 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 5389276bc7 FINERACT-1555: Upgrade libraries 2022-03-30 17:22:44 +02:00
ManojandGitHub bc0b5c00bb FINERACT-1450-fix (#2177) 2022-03-28 22:41:36 +05:30
Renovate BotandPetri Tuomola 35d0c4fbce chore(deps): update dependency io.github.classgraph:classgraph to v4.8.143 2022-03-28 22:22:02 +08:00
Aleksandar VidakovicandAleksandar Vidakovic a20d586c84 FINERACT-1550: Fix repetitive JdbcTemplate/RoutingDataSource injection 2022-03-27 08:00:10 +02:00
Aleksandar VidakovicandAleksandar Vidakovic 863d70c081 FINERACT-1529: Update dependencies 2022-03-27 07:59:29 +02:00
Aleksandar VidakovicandArnold Gálovics da03d73704 FINERACT-1547: Cleanup unnecessary credit bureau dependency in infrastructure core 2022-03-26 10:06:08 +01:00
Aleksandar VidakovicandAleksandar Vidakovic 83eb0842dc FINERACT-1532: Create an example for pluggability 2022-03-25 08:56:59 +01:00
dependabot[bot]andPetri Tuomola 2ebde6d080 chore(deps): bump aws-java-sdk-s3 from 1.12.182 to 1.12.185
Bumps [aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.182 to 1.12.185.
- [Release notes](https://github.com/aws/aws-sdk-java/releases)
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.182...1.12.185)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 14:16:17 +08:00
dependabot[bot]andPetri Tuomola 800495f64e chore(deps): bump swagger-ui-dist from 4.6.2 to 4.9.0
Bumps [swagger-ui-dist](https://github.com/swagger-api/swagger-ui) from 4.6.2 to 4.9.0.
- [Release notes](https://github.com/swagger-api/swagger-ui/releases)
- [Commits](https://github.com/swagger-api/swagger-ui/compare/v4.6.2...v4.9.0)

---
updated-dependencies:
- dependency-name: org.webjars.npm:swagger-ui-dist
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 14:15:46 +08:00
John WoodlockandAleksandar Vidakovic b0e37c24eb Allow externalId to be provided when creating loan charges 2022-03-24 15:28:12 +01:00
dependabot[bot]andAleksandar Vidakovic b387a92b13 chore(deps): bump aws-java-sdk-s3 from 1.12.181 to 1.12.182
Bumps [aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.181 to 1.12.182.
- [Release notes](https://github.com/aws/aws-sdk-java/releases)
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.181...1.12.182)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 13:50:46 +01:00
taskain7andAleksandar Vidakovic bd48a93e24 FINERACT-1483: fix Sonar bugs with Blocker and Critical severity 2022-03-22 13:49:47 +01:00
Arnold GalovicsandAleksandar Vidakovic 2d2192ca17 FINERACT-1508: Liquibase test extension for Cucumber + Windows path shortening enabled for Cucumber 2022-03-21 15:09:39 +01:00
Aleksandar VidakovicandAleksandar Vidakovic 17f521604d Fix transitive dependency issues introduced by Mock Server upgrade 2022-03-21 13:04:57 +01:00
Aleksandar VidakovicandArnold Gálovics 5232656a6e FINERACT-1508: Add Cucumber test suppport 2022-03-18 09:23:15 +01:00
Arnold GalovicsandAleksandar Vidakovic 56824802b3 FINERACT-849: Keep EclipseLink on the same version with Dependabot 2022-03-18 09:14:01 +01:00
dependabot[bot]andAleksandar Vidakovic 173f603f64 chore(deps): bump liquibase-core from 4.8.0 to 4.9.0
Bumps [liquibase-core](https://github.com/liquibase/liquibase) from 4.8.0 to 4.9.0.
- [Release notes](https://github.com/liquibase/liquibase/releases)
- [Changelog](https://github.com/liquibase/liquibase/blob/master/changelog.txt)
- [Commits](https://github.com/liquibase/liquibase/compare/v4.8.0...v4.9.0)

---
updated-dependencies:
- dependency-name: org.liquibase:liquibase-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-18 09:12:51 +01:00
Renovate BotandAwasum Yannick e9d97a6f9b chore(deps): update dependency org.springframework:spring-framework-bom to v5.3.17 2022-03-17 17:45:27 +01:00
dependabot[bot]andAleksandar Vidakovic b544068fe4 chore(deps): bump aws-java-sdk-s3 from 1.12.179 to 1.12.180
Bumps [aws-java-sdk-s3](https://github.com/aws/aws-sdk-java) from 1.12.179 to 1.12.180.
- [Release notes](https://github.com/aws/aws-sdk-java/releases)
- [Changelog](https://github.com/aws/aws-sdk-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-java/compare/1.12.179...1.12.180)

---
updated-dependencies:
- dependency-name: com.amazonaws:aws-java-sdk-s3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 10:40:13 +01:00
Renovate BotandAleksandar Vidakovic d883a5aa9c chore(deps): update dependency org.mock-server:mockserver-junit-jupiter to v5.13.0 2022-03-17 10:39:43 +01:00
2430 changed files with 111210 additions and 44545 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ Please make sure these boxes are checked before submitting your pull request - t
- [ ] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
- [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/api-docs/apiLive.htm with details of any API changes
- [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
- [ ] Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
-6
View File
@@ -3,12 +3,6 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
timezone: "Europe/Zurich"
open-pull-requests-limit: 13
- package-ecosystem: "github-actions"
directory: "/"
schedule:
@@ -1,24 +1,28 @@
name: Fineract Docker build
name: Fineract Docker build - MariaDB
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Build the image
run: ./gradlew :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
- name: Start the stack
run: docker-compose up -d
- name: Wait for stack to come up
run: sleep 60
run: sleep 120
- name: Check health
run: curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
- name: Check info
@@ -1,24 +1,28 @@
name: Fineract Docker build for PostgreSQL
name: Fineract Docker build - PostgreSQL
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Build the image
run: ./gradlew :fineract-provider:clean :fineract-provider:jibDockerBuild -x test
- name: Start the stack
run: docker-compose -f docker-compose-postgresql.yml up -d
- name: Wait for stack to come up
run: sleep 60
run: sleep 120
- name: Check health
run: curl -f -k --retry 5 --retry-connrefused --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
- name: Check info
+32
View File
@@ -0,0 +1,32 @@
name: Fineract Documentation build
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
with:
node-version: 16
- name: Congfigure vega-cli
run: npm i -g vega-cli --unsafe
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
- name: Install additional software
run: |
sudo apt-get update
sudo apt-get install ghostscript graphviz -y
- name: Documentation build
run: ./gradlew --no-daemon --console=plain doc
+84
View File
@@ -0,0 +1,84 @@
name: Fineract Build & Test - MariaDB
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
services:
mariad:
image: mariadb:10.10
ports:
- 3306:3306
env:
MARIADB_ROOT_PASSWORD: mysql
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
mock-oauth2-server:
image: ghcr.io/navikt/mock-oauth2-server:0.5.6
ports:
- 9000:9000
env:
SERVER_PORT: 9000
JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }'
env:
TZ: Asia/Kolkata
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
with:
node-version: 16
- name: Congfigure vega-cli
run: npm i -g vega-cli --unsafe
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
- name: Verify MariaDB connection
run: |
while ! mysqladmin ping -h"127.0.0.1" -P3306 ; do
sleep 1
done
- name: Initialise databases
run: |
./gradlew --no-daemon -q createDB -PdbName=fineract_tenants
./gradlew --no-daemon -q createDB -PdbName=fineract_default
- name: Install additional software
run: |
sudo apt-get update
sudo apt-get install ghostscript graphviz -y
- name: Build & Test
run: |
./gradlew --no-daemon --console=plain build test --fail-fast -x doc -x :twofactor-tests:test -x :oauth2-test:test
./gradlew --no-daemon --console=plain :twofactor-tests:test --fail-fast
./gradlew --no-daemon --console=plain :oauth2-tests:test --fail-fast
- name: Archive test results
if: always()
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
with:
name: test-results
path: |
integration-tests/build/reports/
twofactor-tests/build/reports/
oauth2-tests/build/reports/
- name: Archive server logs
if: always()
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
with:
name: server-logs
path: |
integration-tests/build/cargo/
twofactor-tests/build/cargo/
oauth2-tests/build/cargo/
+84
View File
@@ -0,0 +1,84 @@
name: Fineract Build & Test - MySQL
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
services:
mariad:
image: mysql:8.0
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: mysql
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
mock-oauth2-server:
image: ghcr.io/navikt/mock-oauth2-server:0.5.6
ports:
- 9000:9000
env:
SERVER_PORT: 9000
JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }'
env:
TZ: Asia/Kolkata
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
with:
node-version: 16
- name: Congfigure vega-cli
run: npm i -g vega-cli --unsafe
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
- name: Verify MariaDB connection
run: |
while ! mysqladmin ping -h"127.0.0.1" -P3306 ; do
sleep 1
done
- name: Initialise databases
run: |
./gradlew --no-daemon -q createMySQLDB -PdbName=fineract_tenants
./gradlew --no-daemon -q createMySQLDB -PdbName=fineract_default
- name: Install additional software
run: |
sudo apt-get update
sudo apt-get install ghostscript graphviz -y
- name: Build & Test
run: |
./gradlew --no-daemon --console=plain build test --fail-fast -x doc -x :twofactor-tests:test -x :oauth2-test:test -PdbType=mysql
./gradlew --no-daemon --console=plain :twofactor-tests:test --fail-fast -PdbType=mysql
./gradlew --no-daemon --console=plain :oauth2-tests:test --fail-fast -PdbType=mysql
- name: Archive test results
if: always()
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
with:
name: test-results
path: |
integration-tests/build/reports/
twofactor-tests/build/reports/
oauth2-tests/build/reports/
- name: Archive server logs
if: always()
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
with:
name: server-logs
path: |
integration-tests/build/cargo/
twofactor-tests/build/cargo/
oauth2-tests/build/cargo/
+39 -22
View File
@@ -1,13 +1,16 @@
name: Fineract Gradle build - basicauth - PostgreSQL
name: Fineract Build & Test - PostgreSQL
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
services:
postgresql:
image: postgres:13.4
image: postgres:13.9
ports:
- 5432:5432
env:
@@ -16,7 +19,7 @@ jobs:
options: --health-cmd="pg_isready -q -d postgres -U root" --health-interval=5s --health-timeout=2s --health-retries=3
mock-oauth2-server:
image: ghcr.io/navikt/mock-oauth2-server:0.4.0
image: ghcr.io/navikt/mock-oauth2-server:0.5.6
ports:
- 9000:9000
env:
@@ -26,24 +29,21 @@ jobs:
env:
TZ: Asia/Kolkata
steps:
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3
with:
node-version: 16
- name: Congfigure vega-cli
run: npm i -g vega-cli --unsafe
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
- name: Verify PostgreSQL connection
run: |
while ! pg_isready -d postgres -U root -h 127.0.0.1 -p 5432 ; do
@@ -56,13 +56,30 @@ jobs:
- name: Install additional software
run: |
sudo apt-get update
sudo apt-get install ghostscript -y
sudo apt-get install ghostscript graphviz -y
- name: Basic Auth Build & Test
run: ./gradlew --no-daemon -q --console=plain licenseMain licenseTest check build test --fail-fast doc -x :twofactor-tests:test -x :oauth2-test:test -PdbType=postgresql
- name: Build & Test
run: |
./gradlew --no-daemon --console=plain build test --fail-fast -x doc -x :twofactor-tests:test -x :oauth2-test:test -PdbType=postgresql
./gradlew --no-daemon --console=plain :twofactor-tests:test --fail-fast -PdbType=postgresql
./gradlew --no-daemon --console=plain :oauth2-tests:test --fail-fast -PdbType=postgresql
- name: 2FA Build & Test
run: ./gradlew --no-daemon -q --console=plain :twofactor-tests:test --fail-fast -PdbType=postgresql
- name: Archive test results
if: always()
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
with:
name: test-results
path: |
integration-tests/build/reports/
twofactor-tests/build/reports/
oauth2-tests/build/reports/
- name: OAuth2 Build & Test
run: ./gradlew --no-daemon -q --console=plain :oauth2-tests:test --fail-fast -PdbType=postgresql
- name: Archive server logs
if: always()
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3
with:
name: server-logs
path: |
integration-tests/build/cargo/
twofactor-tests/build/cargo/
oauth2-tests/build/cargo/
-67
View File
@@ -1,67 +0,0 @@
name: Fineract Gradle build - basicauth
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
services:
mariad:
image: mariadb:10.8
ports:
- 3306:3306
env:
MARIADB_ROOT_PASSWORD: mysql
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
mock-oauth2-server:
image: ghcr.io/navikt/mock-oauth2-server:0.4.0
ports:
- 9000:9000
env:
SERVER_PORT: 9000
JSON_CONFIG: '{ "interactiveLogin": true, "httpServer": "NettyWrapper", "tokenCallbacks": [ { "issuerId": "auth/realms/fineract", "tokenExpiry": 120, "requestMappings": [{ "requestParam": "scope", "match": "fineract", "claims": { "sub": "mifos", "scope": [ "test" ] } } ] } ] }'
env:
TZ: Asia/Kolkata
steps:
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1
- name: Verify MariaDB connection
run: |
while ! mysqladmin ping -h"127.0.0.1" -P3306 ; do
sleep 1
done
- name: Initialise databases
run: |
./gradlew --no-daemon -q createDB -PdbName=fineract_tenants
./gradlew --no-daemon -q createDB -PdbName=fineract_default
- name: Install additional software
run: |
sudo apt-get update
sudo apt-get install ghostscript -y
- name: Basic Auth Build & Test
run: ./gradlew --no-daemon -q --console=plain licenseMain licenseTest check build test --fail-fast doc -x :twofactor-tests:test -x :oauth2-test:test
- name: 2FA Build & Test
run: ./gradlew --no-daemon -q --console=plain :twofactor-tests:test --fail-fast
- name: OAuth2 Build & Test
run: ./gradlew --no-daemon -q --console=plain :oauth2-tests:test --fail-fast
-42
View File
@@ -1,42 +0,0 @@
# This is the GitHub Action which
# automatically updates https://www.fineract.dev
#
# see https://jira.apache.org/jira/browse/FINERACT-970
# https://github.com/marketplace/actions/setup-gcloud-environment
# and http://blog2.vorburger.ch/2020/05/fineractdev-cicd-from-github-to-google.html
#
# Created by Michael Vorburger.ch for Fineract in May 2020.
#
name: Deploy to https://www.fineract.dev
on:
push:
branches:
- develop
jobs:
setup-build-deploy:
name: Deploy on Fineract.dev
if: github.repository == 'apache/fineract'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: 'auth'
uses: google-github-actions/auth@v0
with:
credentials_json: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS}}'
- uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GOOGLE_PROJECT_ID }}
- run: gcloud components install beta
- run: JOBS=$(gcloud beta builds list --ongoing --format="value[terminator=' '](id)") && [ ! -z "$JOBS" ] && echo "Cancelling $JOBS..." && gcloud builds cancel $JOBS --no-user-output-enabled || true
- run: gcloud beta builds triggers list
- run: gcloud beta builds triggers run deploy-demo --branch=master
+17 -17
View File
@@ -1,32 +1,32 @@
name: Fineract Sonarqube
on: [push, pull_request]
on:
push:
branches:
- develop
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
env:
TZ: Asia/Kolkata
SONAR_ORGANIZATION: apache
SONAR_HOST_URL: https://sonarcloud.io
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }}
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
steps:
- name: Set up cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6
- name: Sonarqube
run: ./gradlew --no-daemon --console=plain -Dsonar.verbose=true -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.organization=$SONAR_ORGANIZATION --info -x rat -x test -x spotbugsMain -x spotbugsTest -x spotbugsGenerated -x licenseMain -x licenseTest -x checkstyleMain -x checkstyleTest --info --stacktrace build sonarqube
run: ./gradlew --no-daemon --console=plain -Dsonar.verbose=true -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.projectKey=$SONAR_PROJECT_KEY --info --stacktrace sonarqube
+7 -1
View File
@@ -5,11 +5,17 @@ name: Mark stale issues and pull requests
on:
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
- uses: actions/stale@5ebf00ea0e4c1561e9b43a292ed34424fb1d4578 # tag=v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# stale-issue-message: 'Stale issue message'
+8
View File
@@ -22,3 +22,11 @@ fineract-provider/out/
fineract-provider/config/swagger/config.json
fineract-provider/config/swagger/fineract-input.yaml
licenses
**/.asciidoctor/images/*
**/.asciidoctor/diagram/*
**/images/diag-*.svg
fineract-avro-schemas/out/
fineract-client/out/
fineract-provider/src/main/generated/
integration-tests/out/
module/dummy/starter/out/
+3 -2
View File
@@ -20,7 +20,7 @@
# https://www.gitpod.io/docs/41_Config_Gitpod_File/
# https://github.com/gitpod-io/workspace-images/tree/master/mysql
image: gitpod/workspace-mysql
image: gitpod/workspace-mysql:2022-08-04-13-40-17
ports:
- port: 3306
onOpen: ignore
@@ -35,8 +35,9 @@ ports:
tasks:
- command: |
# NB MySQL on GitPod.io is currently quite slow.
# similar to .travis.yml, but using authentication_string= instead of password= due to mysql major version difference
# Using authentication_string= instead of password= due to mysql major version difference
mysql -e "USE mysql;\nUPDATE user SET authentication_string=PASSWORD('mysql') WHERE user='root';\nFLUSH PRIVILEGES;\n"
./gradlew createDB -PdbName=fineract_tenants
./gradlew createDB -PdbName=fineract_default
./gradlew build -x test
init: sdk default java 17.0.4.fx-zulu
-80
View File
@@ -1,80 +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.
#
# https://docs.travis-ci.com/user/reference/linux/
# Must use a fixed distribution (and remember to occassionally upgrade..)
# to avoid surprise changes such as https://issues.apache.org/jira/browse/FINERACT-763
dist: bionic
language: generic
addons:
sonarcloud:
organization: "apache"
token:
secure: "Q2E9ijK+9+R6nkb9o2FQrKUiAozp0325mlGfM25rGV3mCRPyWR/lU8o48r2eaBEX8SEvMvXIO3XXD9SPyUX2+svLz0MOMdfZfNveg6jmcHNRjkzzBK0bMIIGbEH/YqJ+psl4nDmlDd6IK4685/1JSRUJLqeKKK2ulixm6PXcmwZWeKD6TjyXsW50zz3yYIOuROHzys/M6H05h1dZD3j6ztnRsjbr7SmqFEVWSRgEd/aAs+HZB9Fv1xN66csRoQUQKgzoBO9egAQcel65Av0Bf+pOQuzVDVyXNohZEYia02MCGlC6OFvtL7xIXGf/vo02RdnlN4Jnma6P37TaNrmpk2e+EGJaZHmL9cb98+Zc39uPb7qEZkMfDdKrW6QVRtScSuCJzpY58WRgTS0jLCxsDBAMfsrIvWbHntFZL9q5aEkFgecj0pg9u6WHxgA8cuPUY5QzHQo9fEUxNJHGJHQ2FkafLniqJp7DVbsyQHmEggaTrGGrketeYvCbSR1oOnBgImUwzjIV9/zOdd10Wzi8x9HsmzrGBPSBaO4fBxjC1LZwdyue2a2+oKvBqpAGcLpGaCRfHTh2yPXhZW4bw11rOmQxgtOQVBXhveciWAUQuVXIak+RZnu/zRvnul9sZ6bb1hEUPkpUypk+FDeLm8T7y2A++u/jBam2vLc0iff5xtA="
# See https://issues.apache.org/jira/browse/FINERACT-937 for background re. what below is all about..
# We basically remove the outdated OpenJDK 11.0.2 which Travis image grabbed from java.net in
# https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_jdk/files/install-jdk.sh#L200
# (which has 11.0.2 hard-coded!), and instead replace it with the latest Azul Zulu Debian package.
# NB /usr/local/lib/jvm/openjdk11/bin is also on the PATH, but there's no need to change it (because we rm -rf anyway)
# Installing Azul Zulu as per official instructions https://docs.azul.com/core/zulu-openjdk/install/debian
before_install:
- echo $JAVA_HOME
- which java
- sudo rm -rf /usr/local/lib/jvm/
install:
- unset _JAVA_OPTIONS
- sudo apt-get -q update
- sudo apt-get -yq install gnupg curl dirmngr
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
- curl -O https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb
- sudo apt-get -yq install ./zulu-repo_1.0.0-3_all.deb
- sudo apt-get -q update
- sudo apt-get -yq install zulu17-jdk
- export JAVA_HOME=/usr/lib/jvm/zulu17
# https://docs.travis-ci.com/user/languages/java/#caching
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.m2
# Check Java environment variables
before_script:
- echo $JDK_JAVA_OPTIONS
- echo $JAVA_OPTIONS
- echo $JAVA_HOME
- which java
- java -version
- which javac
- javac -version
- $JAVA_HOME/bin/java -version
script:
- date
# Using travis_wait for a proccess that could take longer than 20 minutes, in this case the SonaQube analysis
# https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
- travis_wait 30 ./gradlew -q --no-daemon --console=plain -x rat -x test sonarqube -Pcoverage=true
- date
+31 -59
View File
@@ -20,21 +20,46 @@ If you are interested in contributing to this project, but perhaps don't quite k
Requirements
============
* Java >= 17 (OpenJDK JVM is tested by our CI on Travis)
* MariaDB 10.6
* Java >= 17 (Azul Zulu JVM is tested by our CI on GitHub Actions)
* MariaDB 10.9
You can run the required version of the database server in a container, instead of having to install it, like this:
docker run --name mariadb-10.8 -p 3306:3306 -e MARIADB_ROOT_PASSWORD=mysql -d mariadb:10.8
docker run --name mariadb-10.9 -p 3306:3306 -e MARIADB_ROOT_PASSWORD=mysql -d mariadb:10.9
and stop and destroy it like this:
docker rm -f mariadb-10.8
docker rm -f mariadb-10.9
Beware that this database container database keeps its state inside the container and not on the host filesystem. It is lost when you destroy (rm) this container. This is typically fine for development. See [Caveats: Where to Store Data on the database container documentation](https://hub.docker.com/_/mariadb) re. how to make it persistent instead of ephemeral.
Tomcat v9 is only required if you wish to deploy the Fineract WAR to a separate external servlet container. Note that you do not require to install Tomcat to develop Fineract, or to run it in production if you use the self-contained JAR, which transparently embeds a servlet container using Spring Boot. (Until FINERACT-730, Tomcat 7/8 were also supported, but now Tomcat 9 is required.)
IMPORTANT: if you use MySQL or MariaDB
============
Recently (after release 1.7.0) we introduced improved date time handling in Fineract. Date time is from now on stored in UTC and we are enforcing UTC timezone even on the JDBC driver, e. g. for MySQL:
```
serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=‘-00:00’
```
__DO__: If you do use MySQL as your Fineract databsae then the following configuration is highly recommended:
* Run the application in UTC (the default command line in our Docker image has the necessary parameters already set)
* Run the MySQL database server in UTC (if you use managed services like AWS RDS then this should be the default anyway, but it would be good to double-check)
__DON'T__: In case the Fineract instance and the MySQL server are __not__ running in UTC then the following could happen:
* MySQL is saving date time values differently from PostgreSQL
* Example scenario: if the Fineract instance runs in timezone: GMT+2, and the local date time is 2022-08-11 17:15 ...
* ... then __PostgreSQL saves__ the LocalDateTime as is: __2022-08-11 17:15__
* ... and __MySQL saves__ the LocalDateTime in UTC: __2022-08-11 15:15__
* ... but when we __read__ the date time from PostgreSQL __or__ from MySQL, then both systems give us the same values: __2022-08-11 17:15 GMT+2__
If a previously used Fineract instance didn't run in UTC (backward compatibility), then all prior dates will be read wrongly by MySQL/MariaDB. This can cause issues when you run the database migration scripts.
__RECOMMENDATION__: you need to shift all dates in your database by the timezone offset that your Fineract instance used.
Instructions how to run for local development
============
@@ -120,7 +145,7 @@ Instructions to execute Integration Tests
============
> Note that if this is the first time to access MySQL DB, then you may need to reset your password.
Run the following commands, very similarly to how [.travis.yml](.travis.yml) does:
Run the following commands:
1. `./gradlew createDB -PdbName=fineract_tenants`
1. `./gradlew createDB -PdbName=fineract_default`
1. `./gradlew clean test`
@@ -338,7 +363,7 @@ complies with the [Apache Software Foundation third-party license policy](https:
Apache Fineract Platform API
============
The API for Fineract is documented in [apiLive.htm](fineract-provider/src/main/resources/static/api-docs/apiLive.htm), and the [apiLive.htm can be viewed on Fineract.dev](https://demo.fineract.dev/fineract-provider/api-docs/apiLive.htm "API Documentation"). If you have your own Fineract instance running, you can find this documentation under [/fineract-provider/api-docs/apiLive.htm](https://localhost:8443/fineract-provider/api-docs/apiLive.htm).
The API for Fineract is documented in [apiLive.htm](fineract-provider/src/main/resources/static/api-docs/apiLive.htm), and the [apiLive.htm can be viewed on Fineract.dev](https://fineract.apache.org/legacy-docs/apiLive.htm "API Documentation"). If you have your own Fineract instance running, you can find this documentation under [/fineract-provider/api-docs/apiLive.htm](https://localhost:8443/fineract-provider/api-docs/apiLive.htm).
The Swagger documentation (work in progress; see [FINERACT-733](https://issues.apache.org/jira/browse/FINERACT-733)) can be accessed under [/fineract-provider/swagger-ui/index.html](https://localhost:8443/fineract-provider/swagger-ui/index.html) and [live Swagger UI here on Fineract.dev](https://demo.fineract.dev/fineract-provider/swagger-ui/index.html).
@@ -457,59 +482,6 @@ Upgrades sometimes require package name changes. Changed code should ideally ha
Our `ClasspathHellDuplicatesCheckRuleTest` detects classes that appear in more than 1 JAR. If a version bump in [`build.gradle`](https://github.com/search?q=repo%3Aapache%2Ffineract+filename%3Abuild.gradle&type=Code&ref=advsearch&l=&l=) causes changes in transitives dependencies, then you may have to add related `exclude` to our [`dependencies.gradle`](https://github.com/apache/fineract/search?q=dependencies.gradle). Running `./gradlew dependencies` helps to understand what is required.
Releasing
---------
[How to Release Apache Fineract](https://cwiki.apache.org/confluence/x/DRwIB) documents the process how we make the source code that is available here in this Git repository into a binary release tar.gz available on http://fineract.apache.org.
Before you use Gradle to create a release you need to make sure that you provide the proper GPG parameters. You have to options:
1. Provide the parameters via ~/.gradle/gradle.properties in your home folder:
```
signing.gnupg.keyName=7890ABCD
signing.gnupg.passphrase=secret
```
IMPORTANT: Do not set your GPG secrets in one of the project gradle.properties and double check that you are not accidentally committing them to Git.
The release command would look then look like this:
```
./gradlew -Pfineract.release clean build
```
2. Another way to provide these parameters are via project parameters on the command line. A release command would then look like this:
```
./gradlew -Pfineract.release -Psigning.gnupg.keyName=7890ABCD -Psigning.gnupg.passphrase=secret clean build
```
NOTE: Let's assume your GPG key ID would be "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCD" then you have to use the last 8 characters (i. e. "7890ABCD") for the signing plugin property "signing.gnupg.keyName".
Above tasks will create the following files in folder build/distributions:
- binary distribution file: apache-fineract-1.6.0-binary.tar.gz
- ASCII armored signature for binary distribution: apache-fineract-1.6.0-binary.tar.gz.asc
- SHA512 checksum for binary distribution: apache-fineract-1.6.0-binary.tar.gz.sha512
- source distribution file: apache-fineract-1.6.0-src.tar.gz
- ASCII armored signature for source distribution: apache-fineract-1.6.0-src.tar.gz.asc
- SHA512 checksum for source distribution: apache-fineract-1.6.0-src.tar.gz.sha512
The signatures are automatically verified by the build script. It will throw an exception if the verification fails.
Additionally, you can verify the validity of the release distribution files e. g. with:
```
gpg --verify build/distributions/apache-fineract-1.6.0-binary.tar.gz.asc
```
The output should look somewhat like this:
```
gpg: assuming signed data in 'build/distributions/apache-fineract-1.6.0-binary.tgz'
gpg: Signature made Mi 26 Aug 2020 17:17:45 CEST
gpg: using RSA key ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCD
gpg: Good signature from "Aleksandar Vidakovic (Apache Fineract Release Manager) <aleks@apache.org>" [ultimate]
```
NOTE: All commands shown above are assuming that the current working directory is the project root folder.
More Information
============
More details of the project can be found at <https://cwiki.apache.org/confluence/display/FINERACT>.
+196 -172
View File
@@ -23,6 +23,7 @@ buildscript {
retrofitVersion = '2.9.0'
okhttpVersion = '4.9.3'
oltuVersion = '1.0.1'
fineractCustomProjects = []
fineractJavaProjects = subprojects.findAll{
[
'fineract-api',
@@ -30,75 +31,79 @@ buildscript {
'integration-tests',
'twofactor-tests',
'oauth2-tests',
'fineract-client'
'fineract-client',
'fineract-avro-schemas'
].contains(it.name)
}
fineractPublishProjects = subprojects.findAll{
[
'fineract-avro-schemas',
'fineract-client'
].contains(it.name)
}
npmRepository = 'https://npm.pkg.github.com'
}
repositories {
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.bmuschko:gradle-cargo-plugin:2.9.0'
classpath 'org.eclipse.persistence:eclipselink:2.7.10'
classpath 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6'
classpath 'com.google.cloud.tools:jib-layer-filter-extension-gradle:0.1.0'
classpath 'com.google.cloud.tools:jib-layer-filter-extension-gradle:0.3.0'
}
}
plugins {
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id "org.barfuin.gradle.taskinfo" version "1.3.1"
id "org.barfuin.gradle.taskinfo" version "1.4.0"
id 'com.adarshr.test-logger' version '3.2.0'
id 'com.diffplug.spotless' version '6.3.0' apply false
id 'org.nosphere.apache.rat' version '0.7.0' apply false
id 'com.diffplug.spotless' version '6.12.0' apply false
id 'org.nosphere.apache.rat' version '0.8.0' apply false
id 'com.github.hierynomus.license' version '0.16.1' apply false
id 'com.github.jk1.dependency-license-report' version '2.1' apply false
id 'org.openapi.generator' version '4.3.1' apply false
id 'org.zeroturnaround.gradle.jrebel' version '1.1.11' apply false
id 'org.springframework.boot' version '2.6.4' apply false
id 'org.openapi.generator' version '6.2.1' apply false
id 'org.zeroturnaround.gradle.jrebel' version '1.1.12' apply false
id 'org.springframework.boot' version '2.7.6' apply false
id 'net.ltgt.errorprone' version '2.0.2' apply false
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.1.13' apply false
id 'com.gorylenko.gradle-git-properties' version '2.4.0' apply false
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.2.7' apply false
id 'com.gorylenko.gradle-git-properties' version '2.4.1' apply false
id 'org.asciidoctor.jvm.convert' version '3.3.2' apply false
id 'org.asciidoctor.jvm.pdf' version '3.3.2' apply false
id 'org.asciidoctor.jvm.epub' version '3.3.2' apply false
id 'org.asciidoctor.jvm.revealjs' version '3.3.2' apply false
id 'org.asciidoctor.jvm.gems' version '3.3.2' apply false
id 'org.asciidoctor.kindlegen.base' version '3.2.0' apply false
id "com.google.cloud.tools.jib" version "3.2.0" apply false
id 'com.google.cloud.tools.jib' version '3.3.1' apply false
id 'fr.brouillard.oss.gradle.jgitver' version '0.10.0-rc03'
id "org.sonarqube" version "3.3"
id "com.github.andygoossens.modernizer" version "1.6.2" apply false
id 'com.github.spotbugs' version '5.0.6' apply false
id 'org.sonarqube' version '3.5.0.2730'
id 'com.github.andygoossens.modernizer' version '1.6.2' apply false
id 'com.github.spotbugs' version '5.0.13' apply false
id 'se.thinkcode.cucumber-runner' version '0.0.11' apply false
id "com.github.davidmc24.gradle.plugin.avro-base" version "1.5.0" apply false
}
apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.release.gradle"
description = '''\
Run as:
gradle clean bootRun'''
ext['groovy.version'] = '3.0.6'
ext['swaggerFile'] = "$rootDir/fineract-provider/build/generated/swagger-ui/fineract.yaml".toString()
ext['groovy.version'] = '3.0.10'
ext['swaggerFile'] = "$rootDir/fineract-provider/build/classes/java/main/static/fineract.yaml".toString()
allprojects {
group = 'org.apache.fineract'
jgitver {
strategy 'PATTERN'
versionPattern '${M}.${m}.${p}-${meta.GIT_SHA1_8}'
// versionPattern '${v}'
versionPattern ( project.hasProperty('fineract.release.version') ? '${v}' : '${M}.${m}.${p}-${meta.GIT_SHA1_8}' )
}
repositories {
mavenCentral()
}
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.adarshr.test-logger'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'com.github.hierynomus.license'
@@ -106,127 +111,14 @@ allprojects {
apply plugin: 'project-report'
apply plugin: 'com.github.jk1.dependency-license-report'
// Configuration for the dependency management plugin
// https://github.com/spring-gradle-plugins/dependency-management-plugin
dependencyManagement {
imports {
mavenBom 'org.springframework:spring-framework-bom:5.3.16'
mavenBom 'org.springframework.boot:spring-boot-dependencies:2.6.4'
mavenBom 'org.junit:junit-bom:5.8.2'
mavenBom 'com.fasterxml.jackson:jackson-bom:2.13.2'
}
dependencies {
// We use fixed versions, instead of inheriting them from the Spring BOM, to be able to be on more recent ones.
// We do not use :+ to get the latest available version available on Maven Central, as that could suddenly break things.
// We use the Renovate Bot to automatically propose Pull Requests (PRs) when upgrades for all of these versions are available.
dependency 'org.eclipse.persistence:org.eclipse.persistence.jpa:2.7.10'
dependency 'com.google.guava:guava:31.1-jre'
dependency 'com.google.code.gson:gson:2.9.0'
dependency 'com.google.truth:truth:1.1.3'
dependency 'com.google.truth.extensions:truth-java8-extension:1.1.3'
dependency 'org.apache.commons:commons-email:1.5'
dependency 'commons-io:commons-io:2.11.0'
dependency 'com.github.librepdf:openpdf:1.3.27'
dependency 'org.mnode.ical4j:ical4j:3.2.1'
dependency 'org.quartz-scheduler:quartz:2.3.2'
dependency 'com.amazonaws:aws-java-sdk-s3:1.12.179'
dependency 'org.ehcache:ehcache:3.10.0'
dependency 'com.github.spullara.mustache.java:compiler:0.9.10'
dependency 'com.jayway.jsonpath:json-path:2.7.0'
dependency 'org.apache.tika:tika-core:2.3.0'
dependency 'org.apache.httpcomponents:httpclient:4.5.13'
dependency 'io.swagger.core.v3:swagger-annotations:2.1.13'
dependency 'jakarta.management.j2ee:jakarta.management.j2ee-api:1.1.4'
dependency 'jakarta.jms:jakarta.jms-api:2.0.3'
dependency 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.3' // Swagger needs exactly this version
dependency 'org.glassfish.jaxb:jaxb-runtime:2.3.6' // Swagger needs exactly this version
dependency 'org.apache.activemq:activemq-broker:5.16.4'
dependency 'org.apache.bval:org.apache.bval.bundle:2.0.5'
dependency 'io.github.classgraph:classgraph:4.8.141'
dependency 'org.awaitility:awaitility:4.2.0'
dependency 'com.github.spotbugs:spotbugs-annotations:4.6.0'
dependency 'javax.cache:cache-api:1.1.1'
dependency 'org.mock-server:mockserver-junit-jupiter:5.12.0'
dependency 'org.webjars.npm:swagger-ui-dist:4.6.2'
dependency 'org.webjars:webjars-locator-core:0.50'
dependency 'com.icegreen:greenmail-junit5:1.6.7'
// fineract client dependencies
dependency "com.squareup.retrofit2:retrofit:$retrofitVersion"
dependency "com.squareup.retrofit2:retrofit-mock:$retrofitVersion"
dependency "com.squareup.retrofit2:adapter-java8:$retrofitVersion"
dependency "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
dependency "com.squareup.retrofit2:adapter-rxjava3:$retrofitVersion"
dependency "com.squareup.retrofit2:adapter-guava:$retrofitVersion"
dependency "com.squareup.retrofit2:converter-wire:$retrofitVersion"
dependency "com.squareup.retrofit2:converter-jackson:$retrofitVersion"
dependency "com.squareup.retrofit2:converter-simplexml:$retrofitVersion"
dependency "com.squareup.retrofit2:converter-jaxb:$retrofitVersion"
dependency "com.squareup.retrofit2:converter-java8:$retrofitVersion"
dependency "com.squareup.retrofit2:converter-scalars:$retrofitVersion"
dependency "com.squareup.retrofit2:converter-gson:$retrofitVersion"
dependency "com.squareup.retrofit2:converter-protobuf:$retrofitVersion"
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.common:$oltuVersion"
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltuVersion"
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.httpclient4:$oltuVersion"
dependency "com.squareup.okhttp3:okhttp:$okhttpVersion"
dependency "com.squareup.okhttp3:okcurl:$okhttpVersion"
dependency "com.squareup.okhttp3:logging-interceptor:$okhttpVersion"
dependency "com.squareup.okhttp3:okhttp-apache:$okhttpVersion"
dependency "com.squareup.okhttp3:okhttp-android-support:$okhttpVersion"
dependency "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion"
dependency "com.squareup.okhttp3:okhttp-sse:$okhttpVersion"
dependency "io.gsonfire:gson-fire:1.8.5"
dependency "io.swagger:swagger-core:1.6.5"
dependency "io.swagger:swagger-annotations:1.6.5"
dependency "javax.annotation:javax.annotation-api:1.3.2"
dependency "com.google.code.findbugs:jsr305:3.0.2"
dependency "commons-codec:commons-codec:1.15"
dependency "org.bouncycastle:bcpkix-jdk15on:1.70"
dependency "org.bouncycastle:bcprov-jdk15on:1.70"
dependency ('org.liquibase:liquibase-core:4.8.0') {
exclude 'javax.xml.bind:jaxb-api'
}
dependency ('org.dom4j:dom4j:2.1.3') {
exclude 'relaxngDatatype:relaxngDatatype' // already in com.sun.xml.bind:jaxb-osgi:2.3.0.1
// FINERACT-940 && FINERACT-966 https://github.com/spotbugs/spotbugs/issues/1128
exclude 'xpp3:xpp3'
exclude 'pull-parser:pull-parser'
}
dependencySet(group: 'org.apache.poi', version: '4.1.2') {
entry 'poi'
entry 'poi-ooxml'
entry 'poi-ooxml-schemas'
}
dependencySet(group: 'io.rest-assured', version: '4.5.1')
{
entry 'rest-assured'
entry 'json-path'
entry 'xml-path'
}
}
}
// Configuration for the sonarqube plugin
// https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-gradle/
sonarqube {
properties {
property "sonar.projectKey", "apache_fineract"
}
}
// Configuration for the sonarqube plugin is now in GitHub Actions
// Configuration for the spotless plugin
// https://github.com/diffplug/spotless/tree/main/plugin-gradle
spotless {
format 'misc', {
target '**/*.md', '**/*.properties', '**/.gitignore', '**/.openapi-generator-ignore', '**/*.yml', '**/*.xml', '**/**.json', '**/*.sql'
targetExclude '**/build/**', '**/bin/**', '**/.settings/**', '**/.idea/**', '**/.gradle/**', '**/gradlew.bat', '**/licenses/**', '**/banner.txt'
targetExclude '**/build/**', '**/bin/**', '**/.settings/**', '**/.idea/**', '**/.gradle/**', '**/gradlew.bat', '**/licenses/**', '**/banner.txt', '.vscode/**'
indentWithSpaces(4)
endWithNewline()
trimTrailingWhitespace()
@@ -252,28 +144,21 @@ allprojects {
"**/gradlew*",
"**/git.properties",
"**/*.html",
"**/*.mustache",
"**/templates/**",
"**/features/**",
"**/results/**",
"**/package-info.java",
"**/keystore.jks",
"**/static/swagger-ui/**",
"**/api-docs/**",
"**/legacy-docs/**",
"**/banner.txt",
"**/build.gradle.mustache",
"**/pom.mustache",
"**/avro/**/*.java",
"**/org/apache/fineract/client/**/*.java"
])
strictCheck true
}
task licenseFormatBuildScripts (type:nl.javadude.gradle.plugins.license.License) {
source = fileTree(dir: "$rootDir/", includes: [
'**/*.bat',
'**/*.sh',
'**/*.sql'
], excludes: [
'**/gradlew*'
])
}
licenseFormat.dependsOn licenseFormatBuildScripts
licenseReport {
outputDir = "$projectDir/licenses"
}
@@ -294,13 +179,15 @@ allprojects {
'**/*.puml',
'**/*.github/**',
'**/MANIFEST.MF',
'**/spring.factories',
'**/*.json',
'**/*.json.template',
'**/*.txt',
'**/*.log',
'**/fineractdev-eclipse-preferences.epf',
'**/template-expected.html',
'**/template.mustache',
'**/features/**',
'**/templates/**',
'**/results/**',
'**/.classpath',
'**/.project',
'**/.idea/**',
@@ -317,8 +204,6 @@ allprojects {
// Notice files
'**/NOTICE_RELEASE',
'**/NOTICE_SOURCE',
// Swagger License
'**/src/main/resources/static/swagger-ui/**',
// gradle
'**/.gradle/**',
'**/gradlew',
@@ -330,7 +215,7 @@ allprojects {
'**/wrapper/**',
'**/build/**',
// Api Docs
'**/api-docs/*.*',
'**/legacy-docs/*.*',
'**/docs/system-architecture/.htaccess',
'**/docs/system-architecture/404.html',
'**/docs/system-architecture/index.html',
@@ -349,7 +234,7 @@ allprojects {
'**/css/fonts/glyphicons-halflings-regular.svg',
'**/assets/jszip.js',
'**/assets/jquery.js',
'**/api-docs/jquery-1.7.min.js',
'**/legacy-docs/jquery-1.7.min.js',
'**/css/toc-0.1.2/**/*.*',
'**/docs/system-architecture/css/main.css',
'**/system-architecture/js/vendor/jquery-1.9.1.min.js',
@@ -363,10 +248,29 @@ allprojects {
// Git build info
"**/git.properties",
".mailmap",
'**/images/diag-*.svg',
'**/*.avsc',
"**/generated/**/*MapperImpl.java"
]
}
}
// NOTE: dynamically load all custom modules
file("${rootDir}/custom").eachDir { companyDir ->
if('build' != companyDir.name && 'docker' != companyDir.name) {
file("${rootDir}/custom/${companyDir.name}").eachDir { categoryDir ->
if('build' != categoryDir.name) {
file("${rootDir}/custom/${companyDir.name}/${categoryDir.name}").eachDir { moduleDir ->
if('build' != moduleDir.name) {
project.fineractJavaProjects.add(project(":custom:${companyDir.name}:${categoryDir.name}:${moduleDir.name}"))
project.fineractCustomProjects.add(project(":custom:${companyDir.name}:${categoryDir.name}:${moduleDir.name}"))
}
}
}
}
}
}
configure(project.fineractJavaProjects) {
// NOTE: order matters!
@@ -375,9 +279,13 @@ configure(project.fineractJavaProjects) {
apply plugin: 'eclipse'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
apply plugin: "net.ltgt.errorprone"
apply plugin: "com.github.spotbugs"
apply plugin: 'net.ltgt.errorprone'
apply plugin: 'com.github.spotbugs'
apply plugin: 'com.github.andygoossens.modernizer'
apply plugin: 'se.thinkcode.cucumber-runner'
apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle"
group = 'org.apache.fineract'
/* define the valid syntax level for source files */
sourceCompatibility = JavaVersion.VERSION_17
@@ -479,10 +387,6 @@ configure(project.fineractJavaProjects) {
lineEndings 'UNIX'
}
// compileJava may create more source files into generated, hence we need to run these tasks after it
licenseMain.dependsOn compileJava
processResources.dependsOn compileJava
// If we are running Gradle within Eclipse to enhance classes,
// set the classes directory to point to Eclipse's default build directory
if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') {
@@ -492,8 +396,8 @@ configure(project.fineractJavaProjects) {
// Configuration for the Checkstyle plugin
// https://docs.gradle.org/current/userguide/checkstyle_plugin.html
dependencies {
checkstyle 'com.puppycrawl.tools:checkstyle:10.0'
checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.41.0'
checkstyle 'com.puppycrawl.tools:checkstyle:10.5.0'
checkstyle 'com.github.sevntu-checkstyle:sevntu-checks:1.43.0'
}
// Configuration for JaCoCo code coverage task
@@ -514,7 +418,7 @@ configure(project.fineractJavaProjects) {
// Configuration for the errorprone plugin
// https://github.com/tbroyer/gradle-errorprone-plugin
dependencies {
errorprone "com.google.errorprone:error_prone_core:2.11.0"
errorprone "com.google.errorprone:error_prone_core:2.16"
}
tasks.withType(JavaCompile) {
@@ -532,7 +436,11 @@ configure(project.fineractJavaProjects) {
"AlmostJavadoc",
"InvalidBlockTag",
"JavaUtilDate", // TODO FINERACT-1298
"ReturnValueIgnored"
"ReturnValueIgnored",
"DirectInvocationOnMock",
"CanIgnoreReturnValueSuggester",
"SameNameButDifferent", // Until errorprone recognizes Lombok
"MultiVariableDeclaration" // Until errorprone recognizes Lombok
)
error(
"DefaultCharset",
@@ -543,7 +451,6 @@ configure(project.fineractJavaProjects) {
"UnnecessaryParentheses",
"MultipleTopLevelClasses",
"MixedMutabilityReturnType",
"MultiVariableDeclaration",
"AssertEqualsArgumentOrderChecker",
"EmptySetMultibindingContributions",
"BigDecimalEquals",
@@ -557,7 +464,6 @@ configure(project.fineractJavaProjects) {
"StreamResourceLeak",
"TruthIncompatibleType",
"ByteBufferBackingArray",
"SameNameButDifferent",
"OrphanedFormatString",
"CatchAndPrintStackTrace",
"ObjectToString",
@@ -586,7 +492,6 @@ configure(project.fineractJavaProjects) {
"MissingCasesInEnumSwitch",
"ReferenceEquality",
"UndefinedEquals",
"PublicConstructorForAbstractClass",
"UnescapedEntity",
"ModifyCollectionInEnhancedForLoop",
"NonCanonicalType",
@@ -616,6 +521,41 @@ configure(project.fineractJavaProjects) {
}
}
compileJava {
dependsOn(rat, licenseMain, licenseTest)
}
dependencies {
implementation (
'ch.qos.logback:logback-core',
'org.slf4j:slf4j-api',
'org.slf4j:log4j-over-slf4j',
'org.slf4j:jul-to-slf4j',
)
implementation ("ch.qos.logback:logback-classic") {
exclude(module: "slf4j-api")
}
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation( 'org.mockito:mockito-core',
'org.mockito:mockito-junit-jupiter',
'org.junit.jupiter:junit-jupiter-api',
'org.junit.jupiter:junit-jupiter-engine',
'org.junit.platform:junit-platform-runner', // required to be able to run tests directly under Eclipse, see FINERACT-943 & FINERACT-1021
'org.bouncycastle:bcpkix-jdk15to18',
'org.bouncycastle:bcprov-jdk15to18',
'org.awaitility:awaitility',
'com.google.truth:truth',
'com.google.truth.extensions:truth-java8-extension',
'io.cucumber:cucumber-core',
'io.cucumber:cucumber-java',
'io.cucumber:cucumber-java8',
'io.cucumber:cucumber-junit-platform-engine',
)
}
test {
useJUnitPlatform()
@@ -630,6 +570,12 @@ configure(project.fineractJavaProjects) {
logLevel 'quiet'
}
cucumber {
tags = 'not @ignore'
main = 'io.cucumber.core.cli.Main'
shorten = 'argfile'
}
// Configuration for spotbugs plugin
// https://github.com/spotbugs/spotbugs-gradle-plugin
@@ -667,12 +613,74 @@ configure(project.fineractJavaProjects) {
}
}
configure(project.fineractCustomProjects) {
compileJava {
dependsOn = []
}
dependencies {
implementation (
'org.springframework:spring-context',
'ch.qos.logback:logback-core',
'org.slf4j:slf4j-api',
'org.slf4j:log4j-over-slf4j',
'org.slf4j:jul-to-slf4j',
)
implementation ("ch.qos.logback:logback-classic") {
exclude(module: "slf4j-api")
}
compileOnly('org.projectlombok:lombok')
annotationProcessor('org.projectlombok:lombok')
annotationProcessor('org.mapstruct:mapstruct-processor')
annotationProcessor('org.springframework.boot:spring-boot-autoconfigure-processor')
annotationProcessor('org.springframework.boot:spring-boot-configuration-processor')
testImplementation ('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'com.jayway.jsonpath', module: 'json-path'
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
exclude group: 'jakarta.activation'
exclude group: 'javax.activation'
exclude group: 'org.skyscreamer'
}
testImplementation( 'org.mockito:mockito-core',
'org.mockito:mockito-inline',
'org.mockito:mockito-junit-jupiter',
'org.junit.jupiter:junit-jupiter-api',
'org.junit.jupiter:junit-jupiter-engine',
'org.junit.platform:junit-platform-runner', // required to be able to run tests directly under Eclipse, see FINERACT-943 & FINERACT-1021
'org.bouncycastle:bcpkix-jdk15to18',
'org.bouncycastle:bcprov-jdk15to18',
'org.awaitility:awaitility',
'com.google.truth:truth',
'com.google.truth.extensions:truth-java8-extension',
'io.github.classgraph:classgraph',
'io.cucumber:cucumber-core',
'io.cucumber:cucumber-java',
'io.cucumber:cucumber-java8',
'io.cucumber:cucumber-junit-platform-engine',
'io.cucumber:cucumber-spring',
)
testCompileOnly('org.projectlombok:lombok')
testAnnotationProcessor('org.projectlombok:lombok')
testAnnotationProcessor('org.mapstruct:mapstruct-processor')
testAnnotationProcessor('org.springframework.boot:spring-boot-autoconfigure-processor')
testAnnotationProcessor('org.springframework.boot:spring-boot-configuration-processor')
}
}
configure(project.fineractPublishProjects) {
apply plugin: 'maven-publish'
apply plugin: 'signing'
publishing {
publications {
mavenJava(MavenPublication) {
groupId 'org.apache.fineract'
artifactId project.name
version "${project.version}-SNAPSHOT"
from components.java
versionMapping {
@@ -685,7 +693,7 @@ configure(project.fineractPublishProjects) {
}
pom {
name = 'Fineract'
name = "Fineract: ${project.name}"
description = 'A secure, multi-tenanted microfinance platform'
url = 'https://fineract.apache.org'
licenses {
@@ -703,7 +711,23 @@ configure(project.fineractPublishProjects) {
}
}
// TODO FINERACT-1102: Actually use this to deploy to ASF (Apache Software Foundation) Nexus Maven Repository
repositories {
def releaseUrl = 'https://repository.apache.org/content/repositories/releases'
def stagingUrl = 'https://repository.apache.org/content/repositories/snapshots'
maven {
name 'apache'
url hasProperty('fineract.release.version') ? releaseUrl : stagingUrl
credentials {
username "${findProperty('fineract.config.username')}"
password "${findProperty('fineract.config.password')}"
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
}
+52
View File
@@ -0,0 +1,52 @@
/**
* 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.
*/
plugins {
id 'io.spring.dependency-management' version '1.1.0'
id 'groovy'
id 'java-gradle-plugin'
id 'groovy-gradle-plugin'
}
apply from: "${projectDir}/src/main/groovy/org.apache.fineract.dependencies.gradle"
description = 'Fineract Gradle Plugin'
repositories {
gradlePluginPortal()
mavenCentral()
}
dependencies {
implementation 'com.sun.activation:jakarta.activation'
implementation 'com.sun.mail:jakarta.mail'
implementation 'org.freemarker:freemarker'
implementation 'org.tmatesoft.svnkit:svnkit'
implementation 'org.bouncycastle:bcprov-jdk15on'
implementation 'org.bouncycastle:bcpg-jdk15on'
implementation 'org.eclipse.jgit:org.eclipse.jgit'
implementation 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache'
implementation 'com.vdurmont:semver4j'
implementation 'org.beryx:text-io'
implementation 'commons-io:commons-io'
implementation 'com.squareup.okhttp3:okhttp'
implementation 'com.squareup.okhttp3:logging-interceptor'
implementation 'com.squareup.retrofit2:retrofit'
implementation 'com.squareup.retrofit2:converter-jackson'
implementation 'com.fasterxml.jackson.core:jackson-databind'
}
@@ -0,0 +1,232 @@
/**
* 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.
*/
apply plugin: 'io.spring.dependency-management'
// Configuration for the dependency management plugin
// https://github.com/spring-gradle-plugins/dependency-management-plugin
dependencyManagement {
imports {
mavenBom 'org.springframework:spring-framework-bom:5.3.24'
mavenBom 'org.springframework.boot:spring-boot-dependencies:2.7.6'
mavenBom 'org.jetbrains.kotlin:kotlin-bom:1.7.22'
mavenBom 'org.junit:junit-bom:5.9.1'
mavenBom 'com.fasterxml.jackson:jackson-bom:2.14.1'
mavenBom 'io.cucumber:cucumber-bom:7.9.0'
mavenBom 'io.netty:netty-bom:4.1.85.Final'
mavenBom 'org.mockito:mockito-bom:4.9.0'
}
dependencies {
// We use fixed versions, instead of inheriting them from the Spring BOM, to be able to be on more recent ones.
// We do not use :+ to get the latest available version available on Maven Central, as that could suddenly break things.
// We use the Renovate Bot to automatically propose Pull Requests (PRs) when upgrades for all of these versions are available.
dependency 'org.slf4j:slf4j-api:1.7.36'
dependency 'org.slf4j:slf4j-simple:1.7.36'
dependency 'org.slf4j:jcl-over-slf4j:1.7.36'
dependency 'org.slf4j:jul-to-slf4j:1.7.36'
dependency 'org.slf4j:log4j-over-slf4j:1.7.36'
dependency 'ch.qos.logback:logback-core:1.2.11'
dependency 'ch.qos.logback:logback-classic:1.2.11'
dependency 'org.eclipse.persistence:org.eclipse.persistence.jpa:2.7.10'
dependency 'com.google.guava:guava:31.1-jre'
dependency 'com.google.code.gson:gson:2.10'
dependency 'com.google.truth:truth:1.1.3'
dependency 'com.google.truth.extensions:truth-java8-extension:1.1.3'
dependency 'com.google.googlejavaformat:google-java-format:1.15.0'
dependency ('org.apache.commons:commons-email:1.5') {
exclude 'com.sun.mail:javax.mail'
exclude 'javax.activation:activation'
}
dependency 'commons-io:commons-io:2.11.0'
dependency 'com.github.librepdf:openpdf:1.3.30'
dependency ('org.mnode.ical4j:ical4j:3.2.7') {
exclude 'com.sun.mail:javax.mail'
}
dependency 'org.quartz-scheduler:quartz:2.3.2'
dependency 'com.amazonaws:aws-java-sdk-s3:1.12.350'
dependency 'org.ehcache:ehcache:3.10.8'
dependency 'com.github.spullara.mustache.java:compiler:0.9.10'
dependency 'com.jayway.jsonpath:json-path:2.7.0'
dependency 'org.apache.tika:tika-core:2.6.0'
dependency ('org.apache.tika:tika-parser-microsoft-module:2.6.0') {
exclude 'org.bouncycastle:bcprov-jdk15on'
exclude 'org.bouncycastle:bcmail-jdk15on'
exclude 'commons-logging:commons-logging'
exclude 'org.apache.logging.log4j:log4j-api'
exclude 'org.slf4j:slf4j-api'
exclude 'commons-io:commons-io'
exclude 'commons-codec:commons-codec'
exclude 'org.apache.commons:commons-compress'
exclude 'org.apache.commons:commons-lang3'
exclude 'org.apache.poi:poi'
exclude 'org.apache.poi:poi-scratchpad'
exclude 'org.glassfish.jaxb:jaxb-runtime'
exclude 'org.apache.commons:commons-compress'
exclude 'xml-apis:xml-apis'
}
dependency ('org.apache.tika:tika-parser-miscoffice-module:2.6.0') {
exclude 'org.bouncycastle:bcprov-jdk15on'
exclude 'org.bouncycastle:bcmail-jdk15on'
exclude 'commons-logging:commons-logging'
exclude 'org.apache.logging.log4j:log4j-api'
exclude 'org.slf4j:slf4j-api'
exclude 'commons-io:commons-io'
exclude 'commons-codec:commons-codec'
exclude 'org.apache.commons:commons-compress'
exclude 'org.apache.commons:commons-lang3'
exclude 'org.apache.poi:poi'
exclude 'org.apache.poi:poi-scratchpad'
exclude 'org.glassfish.jaxb:jaxb-runtime'
exclude 'org.apache.commons:commons-compress'
exclude 'xml-apis:xml-apis'
}
dependency 'org.apache.httpcomponents:httpclient:4.5.13'
dependency 'jakarta.management.j2ee:jakarta.management.j2ee-api:1.1.4'
dependency 'jakarta.jms:jakarta.jms-api:2.0.3'
dependency 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6'
dependency 'org.glassfish.jersey.media:jersey-media-multipart:2.36'
dependency 'org.glassfish.jaxb:jaxb-runtime:2.3.6' // Swagger needs exactly this version
dependency 'org.apache.bval:org.apache.bval.bundle:2.0.6'
dependency 'joda-time:joda-time:2.12.1'
dependency 'io.github.classgraph:classgraph:4.8.151'
dependency 'org.awaitility:awaitility:4.2.0'
dependency 'com.github.spotbugs:spotbugs-annotations:4.7.3'
dependency 'javax.cache:cache-api:1.1.1'
dependency 'org.mock-server:mockserver-junit-jupiter:5.14.0'
dependency 'org.webjars:webjars-locator-core:0.52'
dependency 'com.icegreen:greenmail-junit5:1.6.11'
dependency 'com.intuit.karate:karate-junit5:1.3.0'
// fineract client dependencies
dependency "com.squareup.retrofit2:retrofit:2.9.0"
dependency "com.squareup.retrofit2:retrofit-mock:2.9.0"
dependency "com.squareup.retrofit2:adapter-java8:2.9.0"
dependency "com.squareup.retrofit2:adapter-rxjava2:2.9.0"
dependency "com.squareup.retrofit2:adapter-rxjava3:2.9.0"
dependency "com.squareup.retrofit2:adapter-guava:2.9.0"
dependency "com.squareup.retrofit2:converter-wire:2.9.0"
dependency "com.squareup.retrofit2:converter-jackson:2.9.0"
dependency "com.squareup.retrofit2:converter-simplexml:2.9.0"
dependency "com.squareup.retrofit2:converter-jaxb:2.9.0"
dependency "com.squareup.retrofit2:converter-java8:2.9.0"
dependency "com.squareup.retrofit2:converter-scalars:2.9.0"
dependency "com.squareup.retrofit2:converter-gson:2.9.0"
dependency "com.squareup.retrofit2:converter-protobuf:2.9.0"
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.common:1.0.1"
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.1"
dependency "org.apache.oltu.oauth2:org.apache.oltu.oauth2.httpclient4:1.0.1"
dependency "com.squareup.okhttp3:okhttp:4.10.0"
dependency "com.squareup.okhttp3:okcurl:4.10.0"
dependency "com.squareup.okhttp3:logging-interceptor:4.10.0"
dependency "com.squareup.okhttp3:okhttp-apache:4.9.3"
dependency "com.squareup.okhttp3:okhttp-android-support:4.9.3"
dependency "com.squareup.okhttp3:okhttp-urlconnection:4.10.0"
dependency "com.squareup.okhttp3:okhttp-sse:4.10.0"
dependency "io.gsonfire:gson-fire:1.8.5"
dependency "com.google.code.findbugs:jsr305:3.0.2"
dependency "commons-codec:commons-codec:1.15"
dependency "org.projectlombok:lombok:1.18.24"
dependency 'org.bouncycastle:bcpkix-jdk15to18:1.72'
dependency 'org.bouncycastle:bcprov-jdk15to18:1.72'
dependency 'org.bouncycastle:bcprov-jdk15on:1.70'
dependency 'org.bouncycastle:bcpg-jdk15on:1.70'
dependency 'org.eclipse.jgit:org.eclipse.jgit:6.3.0.202209071007-r'
dependency 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache:6.3.0.202209071007-r'
dependency 'org.tmatesoft.svnkit:svnkit:1.10.9'
dependency 'com.vdurmont:semver4j:3.1.0'
dependency 'org.beryx:text-io:3.4.1'
dependency 'org.springdoc:springdoc-openapi-ui:1.6.13'
dependency 'org.springdoc:springdoc-openapi-webmvc-core:1.6.13'
dependency 'org.springdoc:springdoc-openapi-common:1.6.13'
dependency 'org.springdoc:springdoc-openapi-security:1.6.13'
dependency 'org.springdoc:springdoc-openapi-javadoc:1.6.13'
dependency 'com.google.cloud.sql:mysql-socket-factory-connector-j-8:1.7.2'
dependency ('org.apache.activemq:activemq-broker:5.17.2') {
exclude 'javax.annotation:javax.annotation-api'
}
dependency 'io.swagger:swagger-annotations:1.6.9'
dependency 'io.swagger.core.v3:swagger-annotations:2.2.7'
dependency ('io.swagger.core.v3:swagger-jaxrs2:2.2.7') {
exclude 'jakarta.activation:jakarta.activation-api'
}
dependency ('io.swagger.core.v3:swagger-core:2.2.7') {
exclude 'jakarta.activation:jakarta.activation-api'
}
dependency "jakarta.annotation:jakarta.annotation-api:1.3.5"
dependency 'jakarta.activation:jakarta.activation-api:2.1.0'
dependency ('com.sun.mail:jakarta.mail:1.6.7') {
// Spring needs this version
exclude 'com.sun.activation:jakarta.activation'
}
dependency ('jakarta.xml.bind:jakarta.xml.bind-api:2.3.3') {
exclude 'jakarta.activation:jakarta.activation-api'
}
dependency ('org.liquibase:liquibase-core:4.17.2') {
exclude 'javax.xml.bind:jaxb-api'
}
dependency ('org.dom4j:dom4j:2.1.3') {
exclude 'relaxngDatatype:relaxngDatatype' // already in com.sun.xml.bind:jaxb-osgi:2.3.0.1
// FINERACT-940 && FINERACT-966 https://github.com/spotbugs/spotbugs/issues/1128
exclude 'xpp3:xpp3'
exclude 'pull-parser:pull-parser'
}
dependency 'org.owasp.esapi:esapi:2.5.1.0'
dependency 'org.awaitility:awaitility:4.2.0'
dependencySet(group: 'org.apache.poi', version: '5.2.2') {
entry 'poi'
entry 'poi-ooxml'
entry 'poi-ooxml-schemas'
}
dependencySet(group: 'io.rest-assured', version: '4.5.1') {
entry 'rest-assured'
entry 'json-path'
entry 'xml-path'
}
dependency 'org.mapstruct:mapstruct:1.5.3.Final'
dependency 'org.mapstruct:mapstruct-processor:1.5.3.Final'
dependency "org.apache.avro:avro:1.11.1"
dependency "io.github.resilience4j:resilience4j-spring-boot2:1.7.1"
dependency ('org.mariadb.jdbc:mariadb-java-client:3.1.0') {
exclude 'org.slf4j:jcl-over-slf4j'
exclude 'org.slf4j:slf4j-api'
}
dependency 'org.postgresql:postgresql:42.5.1'
}
}
@@ -0,0 +1,268 @@
/**
* 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.
*/
apply plugin: 'org.apache.fineract.gradle'
apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle"
fineract {
config {
username = "${findProperty('fineract.config.username')}"
password = "${findProperty('fineract.config.password')}"
doc {
url = 'git@github.com:apache/fineract-site.git'
directory = "${System.getProperty("java.io.tmpdir")}/fineract-site"
branch = "asf-site"
}
git {
dir = "${projectDir.absolutePath}/.git"
sections = [
[
section: "user",
name: "name",
value: "${findProperty('fineract.config.name')}",
],
[
section: "user",
name: "email",
value: "${findProperty('fineract.config.email')}",
],
[
section: "user",
name: "signingkey",
value: "${findProperty('fineract.config.gnupg.keyName')}",
],
[
section: "commit",
name: "gpgsign",
value: "true",
],
]
}
template {
templateDir = "${projectDir}/buildSrc/src/main/resources"
}
gpg {
keyName = "${findProperty('fineract.config.gnupg.keyName')}"
publicKeyring = "${findProperty('fineract.config.gnupg.publicKeyring')}"
secretKeyring = "${findProperty('fineract.config.gnupg.secretKeyring')}"
password = "${findProperty('fineract.config.gnupg.password')}"
}
smtp {
host = 'smtp.gmail.com'
username = "${findProperty('fineract.config.smtp.username')}"
password = "${findProperty('fineract.config.smtp.password')}"
tls = true
ssl = true
}
subversion {
username = "${findProperty('fineract.config.username')}"
password = "${findProperty('fineract.config.password')}"
revision = 'HEAD'
}
jira {
url = 'https://issues.apache.org/jira/rest/api/2/'
username = "${findProperty('fineract.config.username')}"
password = "${findProperty('fineract.config.password')}"
}
confluence {
url = 'https://cwiki.apache.org/confluence/rest/api/'
username = "${findProperty('fineract.config.username')}"
password = "${findProperty('fineract.config.password')}"
}
}
steps = [
test: [
order: 0,
description: 'Test',
email: [
from: "${findProperty('fineract.config.email')}",
to: "${findProperty('fineract.config.email')}",
mime: 'text/plain',
subject: "[FINERACT] [TEST] 📣 🏁 🗳️ 🚀 📈 🔀 🌠 Propose new release ${version}",
messageTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step01.headsup.message.ftl"
]
],
subversion: [
url: 'https://dist.apache.org/repos/dist/dev/fineract',
directory: "${System.getProperty("java.io.tmpdir")}"
],
jira: [
query: "project in (\'FINERACT\') and fixVersion = ${findProperty('fineract.release.version')} and status in (CLOSED, RESOLVED)"
],
template: [
templateFile: "${projectDir}/buildSrc/src/main/resources/jira/changelog.txt.ftl"
],
gpg: [
files: [
"${projectDir}/buildSrc/build/libs/buildSrc.jar"
]
]
],
step1: [
order: 1,
description: 'Send heads-up email to dev mailing list',
email: [
from: "${findProperty('fineract.config.email')}",
name: "${findProperty('fineract.config.name')}",
to: "${findProperty('fineract.config.email')}",
// to: 'dev@fineract.apache.org',
mime: 'text/plain',
subjectTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step01.headsup.subject.ftl"
],
messageTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step01.headsup.message.ftl"
]
]
],
step2: [
order: 2,
description: 'Clean up JIRA',
],
step3: [
order: 3,
description: 'Create a release branch',
email: [
from: "${findProperty('fineract.config.email')}",
name: "${findProperty('fineract.config.name')}",
to: "${findProperty('fineract.config.email')}",
// to: 'dev@fineract.apache.org',
mime: 'text/plain',
subjectTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step03.branch.subject.ftl"
],
messageTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step03.branch.message.ftl"
]
]
],
step4: [
order: 4,
description: 'Freeze JIRA version',
],
step5: [
order: 5,
description: 'Create release tag',
git: [
messageTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/git/release.step05.tag.message.ftl"
]
]
],
step6: [
order: 6,
description: 'Create a distribution',
],
step7: [
order: 7,
description: 'Sign the distribution artifacts',
gpg: [
files: [
"${rootDir}/fineract-war/build/distributions/apache-fineract-${project.version}-src.tar.gz",
"${rootDir}/fineract-war/build/distributions/apache-fineract-${project.version}-binary.tar.gz"
]
]
],
step8: [
order: 8,
description: 'Upload distribution artifacts to staging environment',
subversion: [
url: 'https://dist.apache.org/repos/dist/dev/fineract',
directory: "${System.getProperty("java.io.tmpdir")}/fineract-dist-dev"
],
],
step9: [
order: 9,
description: 'Verify distribution in staging environment',
],
step10: [
order: 10,
description: 'Start voting on the dev mailing list',
email: [
from: "${findProperty('fineract.config.email')}",
name: "${findProperty('fineract.config.name')}",
to: "${findProperty('fineract.config.email')}",
// to: 'dev@fineract.apache.org',
mime: 'text/plain',
subjectTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step10.vote.subject.ftl"
],
messageTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step10.vote.message.ftl"
]
]
],
step11: [
order: 11,
description: 'Conclude the vote and announce results',
email: [
from: "${findProperty('fineract.config.email')}",
name: "${findProperty('fineract.config.name')}",
to: "${findProperty('fineract.config.email')}",
// to: 'dev@fineract.apache.org',
mime: 'text/plain',
subjectTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step11.vote.subject.ftl"
],
messageTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step11.vote.message.ftl"
]
]
],
step12: [
order: 12,
description: 'Upload distribution artifacts to release environment',
subversion: [
url: 'https://dist.apache.org/repos/dist/release/fineract',
directory: "${System.getProperty("java.io.tmpdir")}/fineract-dist-release"
],
],
step13: [
order: 13,
description: 'Close release branch and merge to \'develop\'',
],
step14: [
order: 14,
description: 'Update website (not yet automated)',
],
step15: [
order: 15,
description: 'Send email to announcement mailing list',
jira: [
projectId: "12319420",
query: "project in (\'FINERACT\') and fixVersion = ${findProperty('fineract.release.version')} and status in (CLOSED, RESOLVED, WONTFIX)"
],
email: [
from: "${findProperty('fineract.config.email')}",
name: "${findProperty('fineract.config.name')}",
to: "${findProperty('fineract.config.email')}",
// to: 'dev@fineract.apache.org',
mime: 'text/plain',
subjectTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step15.announce.subject.ftl"
],
messageTemplate: [
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step15.announce.message.ftl"
]
]
]
]
}
@@ -0,0 +1,579 @@
/**
* 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.
*/
package org.apache.fineract.gradle
import groovy.json.JsonSlurper
import org.apache.commons.io.FileUtils
import org.apache.commons.io.filefilter.NotFileFilter
import org.apache.commons.io.filefilter.PrefixFileFilter
import org.apache.fineract.gradle.service.*
import org.beryx.textio.TextIO
import org.beryx.textio.TextIoFactory
import org.beryx.textio.TextTerminal
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.slf4j.Logger
import org.slf4j.LoggerFactory
class FineractPlugin implements Plugin<Project> {
private static final Logger log = LoggerFactory.getLogger(FineractPlugin.class)
private JiraService jiraService
private ConfluenceService confluenceService
private SubversionService subversionService
private EmailService emailService
private GpgService gpgService
private TemplateService templateService
private GitService gitService
private Map<String, ?> context;
static {
System.setProperty("org.beryx.textio.TextTerminal", "org.beryx.textio.system.SystemTextTerminal")
}
void apply(Project project) {
def extension = project.extensions.create("fineract", FineractPluginExtension, project)
project.fineract.extensions.create("config", FineractPluginExtension.FineractPluginConfig)
project.fineract.config.extensions.create("doc", FineractPluginExtension.FineractPluginConfigDoc)
project.fineract.config.extensions.create("template", FineractPluginExtension.FineractPluginConfigTemplate)
project.fineract.config.extensions.create("smtp", FineractPluginExtension.FineractPluginConfigSmtp)
project.fineract.config.extensions.create("subversion", FineractPluginExtension.FineractPluginConfigSubversion)
project.fineract.config.extensions.create("jira", FineractPluginExtension.FineractPluginConfigJira)
project.fineract.config.extensions.create("confluence", FineractPluginExtension.FineractPluginConfigConfluence)
project.fineract.config.extensions.create("gpg", FineractPluginExtension.FineractPluginConfigGpg)
project.fineract.config.extensions.create("git", FineractPluginExtension.FineractPluginConfigGit)
project.afterEvaluate {
this.templateService = new TemplateService(extension.config.template)
this.jiraService = new JiraService(extension.config.jira)
this.confluenceService = new ConfluenceService(extension.config.confluence)
this.subversionService = new SubversionService(extension.config.subversion)
this.emailService = new EmailService(extension.config.smtp)
this.gpgService = new GpgService(extension.config.gpg)
this.gitService = new GitService(extension.config.git, extension.config.gpg)
this.context = context(project)
}
project.tasks.register("fineractDocPublish") {
dependsOn(":fineract-doc:doc")
doLast {
log.warn("Fineract Publish Doc...")
def url = extension.config.doc.url?:"git@github.com:apache/fineract-site.git";
def branch = extension.config.doc.branch?:"asf-site"
def directory = extension.config.doc.directory?:System.getProperty("java.io.tmpdir")+"/fineract-site"
def d = new File(directory)
if(d.exists()) {
gitService.pull(directory)
} else {
gitService.clone(url, branch, directory)
gitService.config(directory, extension.config.git.sections)
}
def source = new File("fineract-doc/build/docs/html/en");
def target = new File(directory + "/docs/current")
if(!target.name) {
target.mkdirs()
}
FileUtils.copyDirectory(source, target, new NotFileFilter(new PrefixFileFilter(".asciidoctor")), true)
gitService.commit(directory)
}
}
project.tasks.register("fineractReleaseTest") {
doFirst {
// emojis:
// https://gist.github.com/parmentf/035de27d6ed1dce0b36a
// https://emojipedia.org/
// https://unicode.org/emoji/charts/full-emoji-list.html
FineractPluginExtension.FineractPluginStep step = step(extension, "test")
// TODO:
// - jira:
// - move tickets to new version
// jira query
FineractPluginExtension.FineractPluginJiraParams result = jiraService.search(step.jira)
log.warn(">>>>>>>>>>>>>>>> ISSUE: ${result.result[0]?.id} - ${result.result[0]?.key} - ${result.result[0]?.fields?['summary']} - ${result.result[0]?.fields?['fixVersions']}")
/*
// confluence create
def content = new ConfluenceService.ConfluenceContent(title: "1.7.0 - Apache Fineract",
space: new ConfluenceService.ConfluenceSpace(key: "FINERACT"),
ancestors: [new ConfluenceService.ConfluenceParent(id: "75974324")],
body: new ConfluenceService.ConfluenceBody(storage: new ConfluenceService.ConfluenceStorage(value: "<h1>Release Artifacts</h1>")))
confluenceService.createContent(content)
// confluence get
ConfluenceService.ConfluenceContent content = confluenceService.getContent("211881930")
log.warn(">>>>>>>>>>>>>>>>>>>>> CONFLUENCE: ${content.id} - ${content.title} - ${content.body?.storage?.value}")
// confluence update
content.body?.storage?.value = "<h1>Release Artifacts</h1><p><ac:structured-macro ac:macro-id=\"ac1cb3cb-84d4-45aa-820b-05cc42d39dd9\" ac:name=\"jira\" ac:schema-version=\"1\"><ac:parameter ac:name=\"server\">ASF JIRA</ac:parameter><ac:parameter ac:name=\"columnIds\">issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,customfield_12311032,customfield_12311037,customfield_12311022,customfield_12311027,priority,status,resolution</ac:parameter><ac:parameter ac:name=\"columns\">key,summary,type,created,updated,due,assignee,reporter,Priority,Priority,Priority,Priority,priority,status,resolution</ac:parameter><ac:parameter ac:name=\"maximumIssues\">50</ac:parameter><ac:parameter ac:name=\"jqlQuery\">project = FINERACT AND fixVersion = 1.7.0 AND status not in (Open)</ac:parameter><ac:parameter ac:name=\"serverId\">5aa69414-a9e9-3523-82ec-879b028fb15b</ac:parameter></ac:structured-macro></p><p><br/></p>"
content.space = new ConfluenceService.ConfluenceSpace(key: "FINERACT")
content.status = null
content.version = new ConfluenceService.ConfluenceVersion(number: 3)
// confluence update
content = confluenceService.updateContent(content.id, content)
log.warn(">>>>>>>>>>>>>>>>>>>>> CONFLUENCE: ${content.id} - ${content.title} - ${content.body?.storage?.value}")
// confluence delete
ConfluenceService.ConfluenceResponse response = confluenceService.deleteContent("211881930")
log.warn(">>>>>>>>>>>>>>>>>>>>> CONFLUENCE: ${response?.statusCode} - ${response?.message}")
// jira versions
def versions = jiraService.getProjectVersions("12319420")
versions.findAll {
log.warn(">>>> VERSION: ${it.id} - ${it.name} - ${it.description}")
}
def version = jiraService.getVersion("12351431")
log.warn(">>>> !!! VERSION: ${version.id} - ${version.name} - ${version.description} - ${version.archived}")
version.archived = !version.archived
jiraService.updateVersion(version)
version = jiraService.getVersion("12351431")
log.warn(">>>> === VERSION: ${version.id} - ${version.name} - ${version.description} - ${version.archived}")
// jira projects
def projects = jiraService.getProjects()
projects.findAll {
log.warn(">>>>>>>>>>>> PROJECT: ${it.id} - ${it.key} - ${it.name}")
}
// jira info
Map<String, Object> info = jiraService.serverInfo()
log.warn(">>>>>>>>>>>>>>>> INFO: ${info}")
// jira query
FineractPluginExtension.FineractPluginJiraParams result = jiraService.search(step.jira)
log.warn(">>>>>>>>>>>>>>>> INFO: ${result.result.size()}")
// format with template
def tmp = templateService.render(step.template, [issues: result.result])
log.warn(tmp.output)
*/
}
}
// TODO: step for creating release Jira ticket missing!
// step 1
project.tasks.register("fineractReleaseStep1") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step1")
String version = project.properties?['fineract.release.version']
String issue = project.properties?['fineract.release.issue']
String date = project.properties?['fineract.release.date']
if(!version || !issue || !date) {
TextIO textIO = TextIoFactory.getTextIO()
if(!version) {
version = textIO.newStringInputReader()
.withPattern("\\d+.\\d+.\\d+")
.read("Release Version");
}
if(!issue) {
issue = textIO.newStringInputReader()
.withMaxLength(4)
.withPattern("\\d+")
.read("Jira Issue");
}
if(!date) {
date = textIO.newStringInputReader()
.withMaxLength(10)
.withPattern("\\d\\d\\d\\d-\\d\\d-\\d\\d")
.read("Date");
}
TextTerminal terminal = textIO.getTextTerminal()
terminal.printf("\nResult: %s - FINERACT-%s - %s", version, issue, date)
}
// TODO: input validation, see FINERACT-1610
this.context?.project?['fineract.release.version'] = version
this.context?.project?['fineract.release.issue'] = issue
this.context?.project?['fineract.release.date'] = date
if(step.email) {
emailService.send( processEmailParams(step.email, this.context) )
}
}
}
// step 2
project.tasks.register("fineractReleaseStep2") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step2")
// TODO: implement this, see FINERACT-1611
printInstructions(project, "step2")
}
}
// step 3
project.tasks.register("fineractReleaseStep3") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step3")
String version = project.properties?['fineract.release.version']
String date = project.properties?['fineract.release.date']
if(!version || !date) {
TextIO textIO = TextIoFactory.getTextIO()
if(!version) {
version = textIO.newStringInputReader()
.withPattern("\\d+.\\d+.\\d+")
.read("Release Version");
}
if(!date) {
date = textIO.newStringInputReader()
.withMaxLength(10)
.withPattern("\\d\\d\\d\\d-\\d\\d-\\d\\d")
.read("Date");
}
TextTerminal terminal = textIO.getTextTerminal()
terminal.printf("\nResult: %s - %s", version, date)
}
// TODO: input validation, see FINERACT-1610
// TODO: create release branch, see FINERACT-1611
this.context?.project?['fineract.release.version'] = version
this.context?.project?['fineract.release.date'] = date
if(step.email) {
emailService.send( processEmailParams(step.email, this.context) )
}
}
}
// step 4
project.tasks.register("fineractReleaseStep4") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step4")
// TODO: implement this, see FINERACT-1611
printInstructions(project, "step4")
}
}
// step 5
project.tasks.register("fineractReleaseStep5") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step5")
String version = project.properties?['fineract.release.version']
if(!version) {
TextIO textIO = TextIoFactory.getTextIO()
if (!version) {
version = textIO.newStringInputReader()
.withPattern("\\d+.\\d+.\\d+")
.read("Release Version");
}
}
this.context?.project?['fineract.release.version'] = version
def params = processGitParams(step.git, this.context)
params.tag = params.tag?:version
gitService.createTag(params.tag, params.message)
}
}
// step 6
project.tasks.register("fineractReleaseStep6") {
dependsOn(":fineract-war:distTar")
}
// step 7
project.tasks.register("fineractReleaseStep7") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step7")
gpgService.sign(step.gpg)
step.gpg.files.findAll {
gpgService.md5(step.gpg)
gpgService.sha512(step.gpg)
}
}
}
// step 8
project.tasks.register("fineractReleaseStep8") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step8")
String version = project.properties?['fineract.release.version']
if(!version) {
TextIO textIO = TextIoFactory.getTextIO()
version = textIO.newStringInputReader()
.withPattern("\\d+.\\d+.\\d+")
.read("Release Version");
}
// TODO: input validation, see FINERACT-1610
subversionService.checkout(step.subversion)
def directory = step.subversion.directory?:System.getProperty("java.io.tmpdir") + "/fineract-dist-dev"
def source = new File("fineract-war/build/distributions")
def target = new File("${directory}/${version}")
FileUtils.copyDirectory(source, target, true)
subversionService.commit(step.subversion)
}
}
// step 9
project.tasks.register("fineractReleaseStep9") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step9")
// TODO: implement this, see FINERACT-1611
printInstructions(project, "step9")
}
}
// step 10
project.tasks.register("fineractReleaseStep10") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step10")
String version = project.properties?['fineract.release.version']
if(!version) {
TextIO textIO = TextIoFactory.getTextIO();
version = textIO.newStringInputReader()
.withPattern("\\d+.\\d+.\\d+")
.read("Release Version");
}
// TODO: input validation, see FINERACT-1610
this.context?.project?['fineract.release.version'] = version
if(step.email) {
emailService.send( processEmailParams(step.email, this.context) )
}
}
}
// step 11
project.tasks.register("fineractReleaseStep11") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step11")
String version = project.properties?['fineract.release.version']
if(!version) {
TextIO textIO = TextIoFactory.getTextIO()
version = textIO.newStringInputReader()
.withPattern("\\d+.\\d+.\\d+")
.read("Release Version");
}
// TODO: input validation, see FINERACT-1610
this.context?.project?['fineract.release.version'] = version
def jsonSlurper = new JsonSlurper()
def data = jsonSlurper.parse(new File("buildSrc/src/main/resources/vote/result.${version}.json"))
this.context?.project?['fineract.vote'] = data
if(step.email) {
emailService.send( processEmailParams(step.email, this.context) )
}
}
}
// step 12
project.tasks.register("fineractReleaseStep12") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step12")
String version = project.properties?['fineract.release.version']
if(!version) {
TextIO textIO = TextIoFactory.getTextIO()
version = textIO.newStringInputReader()
.withPattern("\\d+.\\d+.\\d+")
.read("Release Version");
}
// TODO: input validation, see FINERACT-1610
subversionService.checkout(step.subversion)
def directory = step.subversion.directory?:System.getProperty("java.io.tmpdir") + "/fineract-dist-release"
def source = new File("fineract-war/build/distributions")
def target = new File("${directory}/${version}")
FileUtils.copyDirectory(source, target, true)
subversionService.commit(step.subversion)
}
}
// step 13
project.tasks.register("fineractReleaseStep13") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step13")
// TODO: implement this, see FINERACT-1611
printInstructions(project, "step13")
}
}
// step 14
project.tasks.register("fineractReleaseStep14") {
doFirst {
FineractPluginExtension.FineractPluginStep step = step(extension, "step14")
// TODO: implement this, see FINERACT-1611
printInstructions(project, "step14")
}
}
// step 15
project.tasks.register("fineractReleaseStep15") {
doFirst {
log.warn("Release step 15: send email to announcement mailing list")
FineractPluginExtension.FineractPluginStep step = step(extension, "step15")
String version = project.properties?['fineract.release.version']
if(!version) {
TextIO textIO = TextIoFactory.getTextIO()
version = textIO.newStringInputReader()
.withPattern("\\d+.\\d+.\\d+")
.read("Release Version");
}
// TODO: input validation, see FINERACT-1610
FineractPluginExtension.FineractPluginJiraParams issues = jiraService.search(step.jira)
def versions = jiraService.getProjectVersions(step.jira.projectId)
def filteredVersions = versions.findAll {
log.warn(">>>> VERSION: ${it.id} - ${it.name} - ${it.description}")
it.name == version
}
this.context?.project?['fineract.release.version'] = version
this.context?.project?['fineract.release.issues'] = issues.result
this.context?.project?['fineract.release.projectId'] = step.jira.projectId
this.context?.project?['fineract.release.versionId'] = filteredVersions[0]?.id
if(step.email) {
emailService.send( processEmailParams(step.email, this.context) )
}
}
}
}
private FineractPluginExtension.FineractPluginStep step(FineractPluginExtension extension, String id) {
FineractPluginExtension.FineractPluginStep step = extension.steps[id]
if(step) {
log.warn("Fineract release step ${step.order}: ${step.description}.")
} else {
throw new RuntimeException("Could not find any parameters for step with ID '${id}'")
}
return step
}
private FineractPluginExtension.FineractPluginEmailParams processEmailParams(FineractPluginExtension.FineractPluginEmailParams params, Object data) {
if(params.subjectTemplate) {
def result = templateService.render(params.subjectTemplate, data)
params.subject = result.output
}
if(params.messageTemplate) {
def result = templateService.render(params.messageTemplate, data)
params.message = result.output
}
return params
}
private FineractPluginExtension.FineractPluginGitParams processGitParams(FineractPluginExtension.FineractPluginGitParams params, Object data) {
if(params.messageTemplate) {
def result = templateService.render(params.messageTemplate, data)
params.message = result.output
}
return params
}
private Map<String, ?> context(Project project) {
return Map.of("project", project.getProperties().findAll { it.key != "password"})
}
private void printInstructions(Project project, String step) {
String version = project.properties?['fineract.release.version']?:"0.0.0"
this.context?.project?['fineract.release.version'] = version
FineractPluginExtension.FineractPluginTemplateParams result = templateService.render(new FineractPluginExtension.FineractPluginTemplateParams(templateFile: new File("buildSrc/src/main/resources/instructions/${step}.txt.ftl")), this.context)
log.warn(result.output)
}
}
@@ -0,0 +1,164 @@
/**
* 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.
*/
package org.apache.fineract.gradle
import org.apache.fineract.gradle.service.JiraService
import org.gradle.api.Project
class FineractPluginExtension {
Project project
Map<String, FineractPluginStep> steps = [:]
FineractPluginExtension(Project project) {
this.project = project
}
static class FineractPluginConfig {
String username
String password
}
static class FineractPluginConfigDoc {
String url
String directory
String branch
}
static class FineractPluginConfigJira {
String url
String username
String password
String project
}
static class FineractPluginConfigConfluence {
String url
String username
String password
String project
}
static class FineractPluginConfigGpg {
String keyName
String publicKeyring
String secretKeyring
String password
}
static class FineractPluginConfigTemplate {
String templateDir
}
static class FineractPluginConfigSmtp {
String host
int port
String username
String password
boolean tls
boolean ssl
}
static class FineractPluginConfigGit {
String username
String password
String dir
boolean dryRun
List<FineractPluginConfigGitSection> sections
}
static class FineractPluginConfigGitSection {
String section
String subsection
String name
String value
}
static class FineractPluginConfigSubversion {
String username
String password
String revision
}
static class FineractPluginStep {
int order
String description
FineractPluginEmailParams email
FineractPluginJiraParams jira
FineractPluginTemplateParams template
FineractPluginConfluenceParams confluence
FineractPluginGitParams git
FineractPluginSubversionParams subversion
FineractPluginGpgParams gpg
}
static class FineractPluginEmailParams {
String from
String name
String to
String cc
String bcc
String mime
String subject
FineractPluginTemplateParams subjectTemplate
String message
FineractPluginTemplateParams messageTemplate
}
static class FineractPluginJiraParams {
String command
String projectId
String fields = "*all"
String query
List<JiraService.JiraIssue> result = new ArrayList<>()
int pageOffset = 0
int pageSize= 50
int total = 1000
List<String> includes = ["summary", "status", "assignee", "fixVersions"]
}
static class FineractPluginConfluenceParams {
String title
String content
Integer ancestor
}
static class FineractPluginGitParams {
String tag
String message
FineractPluginTemplateParams messageTemplate
}
static class FineractPluginSubversionParams {
String url
String command
String revision = "HEAD"
String directory
}
static class FineractPluginTemplateParams {
String template
String templateFile
String output
String outputFile
}
static class FineractPluginGpgParams {
List<String> files
}
}
@@ -0,0 +1,209 @@
/**
* 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.
*/
package org.apache.fineract.gradle.service
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.ObjectMapper
import okhttp3.ConnectionPool
import okhttp3.Credentials
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.Response
import okhttp3.logging.HttpLoggingInterceptor
import org.apache.fineract.gradle.FineractPluginExtension.FineractPluginConfigConfluence
import org.jetbrains.annotations.NotNull
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Retrofit
import retrofit2.converter.jackson.JacksonConverterFactory
import retrofit2.http.*
import java.util.concurrent.TimeUnit
class ConfluenceService {
private static final Logger log = LoggerFactory.getLogger(ConfluenceService.class)
private ConfluenceApi api
ConfluenceService(FineractPluginConfigConfluence config) {
def credentials = Credentials.basic(config.username, config.password)
final ConnectionPool connectionPool = new ConnectionPool(5, 60, TimeUnit.SECONDS);
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(log::debug)
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY)
OkHttpClient.Builder okClient = new OkHttpClient.Builder()
.connectionPool(connectionPool)
.addInterceptor(loggingInterceptor)
.addInterceptor(new Interceptor() {
@Override
Response intercept(@NotNull Interceptor.Chain chain) throws IOException {
def request = chain.request()
request = request.newBuilder().header("Authorization", credentials).build()
return chain.proceed(request)
}
})
ObjectMapper mapper = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
Retrofit.Builder builder = new Retrofit.Builder()
.baseUrl(config.url)
.client(okClient.build())
.addConverterFactory(JacksonConverterFactory.create(mapper))
Retrofit retrofit = builder.build()
this.api = retrofit.create(ConfluenceApi.class)
}
ConfluenceContent getContent(String id) {
this.api.getContentById(id).execute().body()
}
ConfluenceContent createContent(ConfluenceContent content) {
this.api.postContent(content).execute().body()
}
ConfluenceContent updateContent(String id, ConfluenceContent content) {
this.api.putContent(id, content).execute().body()
}
ConfluenceResponse deleteContent(String id) {
this.api.deleteContentById(id).execute().body()
}
static class ConfluenceContent {
String id
String type
String title
String status
String self
List<ConfluenceParent> ancestors
ConfluenceSpace space
ConfluenceBody body
ConfluenceVersion version
ConfluenceHistory history
}
static class ConfluenceContentResult {
List<ConfluenceContent> results
private int start
private int limit
private int size
}
static class ConfluenceParent {
String id
String type
}
static class ConfluenceVersion {
ConfluenceCreatedBy by
Date when
String message
Integer number
}
static class ConfluenceCreatedBy {
String username
String displayName
}
static class ConfluenceHistory {
boolean latest
ConfluenceCreatedBy createdBy
ConfluenceVersion nextVersion
ConfluenceVersion previousVersion
ConfluenceVersion lastUpdated
}
static class ConfluenceSpace {
String key
String name
}
static class ConfluenceSpaceResult {
List<ConfluenceSpace> results
}
static class ConfluenceBody {
ConfluenceStorage storage
}
static class ConfluenceStorage {
String value
String representation
}
static class ConfluenceResponse {
int statusCode
String message
Map<String, ?> data
}
static interface ConfluenceApi {
@GET("content")
Call<ConfluenceContentResult> getContentResults();
@GET("content")
Call<ConfluenceContentResult> getContentBySpaceKeyAndTitle(final @Query("key") String key, final @Query("title") String title);
@GET("content/{id}/child/{type}")
Call<ConfluenceContentResult> getChildren(final @Path("id") String parentId, final @Path("type") String type, final @QueryMap Map<String, String> params);
@GET("content/{id}?expand=body.storage")
Call<ConfluenceContent> getContentById(final @Path("id") String id);
@POST("contentbody/convert/{to}")
Call<ConfluenceStorage> postContentConversion(final @Body ConfluenceStorage storage, final @Path("to") String convertToFormat);
@POST("content")
Call<ConfluenceContent> postContent(final @Body ConfluenceContent content);
@PUT("content/{id}")
Call<ConfluenceContent> putContent(final @Path("id") String id, final @Body ConfluenceContent content);
@POST("content")
void postContentWithCallback(final @Body ConfluenceContent content, final Callback<ConfluenceContent> callback);
@DELETE("content/{id}")
Call<ConfluenceResponse> deleteContentById(final @Path("id") String id);
@GET("space")
Call<ConfluenceSpaceResult> getSpaces();
@POST("space")
Call<ConfluenceSpace> createSpace(final @Body ConfluenceSpace space);
@POST("space/_private")
Call<ConfluenceSpace> createPrivateSpace(final @Body ConfluenceSpace space);
@GET("space/{spaceKey}/content/page")
Call<ConfluenceContentResult> getAllSpaceContent(final @Path("spaceKey") String spaceKey, final @QueryMap Map<String, String> params);
@GET("space/{spaceKey}/content/{type}")
Call<ConfluenceContentResult> getRootContentBySpaceKey(final @Path("spaceKey") String spaceKey, final @Path("type") String contentType);
}
}
// curl -u aleks:xxx -X POST -H 'Content-Type: application/json' -d '{"type":"page","title":"1.7.0 - Apache Fineract","space":{"key":"FINERACT"},"ancestors":[{"id":75974324}],"body":{"storage":{"value":"<p>This is <br/> a new page</p>","representation": "storage"}}}' https://cwiki.apache.org/confluence/content/ | python -mjson.tool
@@ -0,0 +1,87 @@
/**
* 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.
*/
package org.apache.fineract.gradle.service
import org.apache.fineract.gradle.FineractPluginExtension
import org.apache.fineract.gradle.FineractPluginExtension.FineractPluginEmailParams
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import javax.mail.*
import javax.mail.internet.InternetAddress
import javax.mail.internet.MimeMessage
class EmailService {
private static final Logger log = LoggerFactory.getLogger(EmailService.class)
String username
String password
Properties properties
EmailService(FineractPluginExtension.FineractPluginConfigSmtp config) {
this.username = config.username
this.password = config.password
this.properties = new Properties()
this.properties.put("mail.smtp.host", config.host)
this.properties.put("mail.smtp.auth", "true")
this.properties.put("mail.smtp.starttls.enable", config.tls.toString())
if(config.ssl) {
this.properties.put("mail.smtp.port", "465")
this.properties.put("mail.smtp.socketFactory.port", "465");
this.properties.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
} else {
this.properties.put("mail.smtp.port", "587")
}
}
void send(FineractPluginEmailParams params) {
log.warn("Sending email: ${params.from} -> ${params.to} - ${params.subject}")
Session session = Session.getInstance(this.properties, new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(getUsername(), getPassword())
}
})
try {
Message msg = new MimeMessage(session)
msg.setFrom(new InternetAddress(params.from, params.name))
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(params.to))
if(params.cc) {
msg.setRecipients(Message.RecipientType.CC, InternetAddress.parse(params.cc))
}
if(params.bcc) {
msg.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(params.bcc))
}
msg.setSubject(params.subject)
msg.setText(params.message);
Transport.send(msg);
log.info("Done")
} catch (MessagingException e) {
log.error(e.toString(), e)
}
}
}
@@ -0,0 +1,136 @@
/**
* 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.
*/
package org.apache.fineract.gradle.service
import org.apache.fineract.gradle.FineractPluginExtension
import org.eclipse.jgit.annotations.NonNull
import org.eclipse.jgit.annotations.Nullable
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.errors.CanceledException
import org.eclipse.jgit.lib.CommitBuilder
import org.eclipse.jgit.lib.GpgSigner
import org.eclipse.jgit.lib.PersonIdent
import org.eclipse.jgit.lib.Repository
import org.eclipse.jgit.lib.StoredConfig
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
import org.eclipse.jgit.transport.CredentialsProvider
import org.eclipse.jgit.transport.RefSpec
import org.slf4j.Logger
import org.slf4j.LoggerFactory
class GitService {
private static final Logger log = LoggerFactory.getLogger(GitService.class)
private Git git
private boolean dryRun
GitService(FineractPluginExtension.FineractPluginConfigGit config, FineractPluginExtension.FineractPluginConfigGpg gpgConfig) {
GpgSigner.setDefault(new GpgSigner() {
@Override
void sign(@NonNull CommitBuilder commit, @Nullable String gpgSigningKey, @NonNull PersonIdent committer, CredentialsProvider credentialsProvider) throws CanceledException {
log.warn("------------------------ KEY: ${gpgSigningKey} IDENT: ${committer}")
}
@Override
boolean canLocateSigningKey(@Nullable String gpgSigningKey, @NonNull PersonIdent committer, CredentialsProvider credentialsProvider) throws CanceledException {
log.warn("------------------------ KEY: ${gpgSigningKey} IDENT: ${committer}")
return false
}
});
Repository repository = new FileRepositoryBuilder()
.readEnvironment()
.setGitDir(new File(config.dir))
.findGitDir()
.build();
this.git = new Git(repository)
this.dryRun = config.dryRun
}
void clone(String url, String branch, String directory) {
def ref = "refs/heads/" + branch
Git.cloneRepository()
.setURI(url)
.setDirectory(new File(directory))
.setBranchesToClone(Arrays.asList(ref))
.setBranch(ref)
.call();
}
void pull(String directory) {
Git git = Git.open(new File(directory));
git.pull().call()
}
void commit(String directory) {
Git git = Git.open(new File(directory));
def status = git.status().call()
if(!status.isClean()) {
git.add().addFilepattern(".").call()
git.commit().setSign(true).setMessage("chore: Publish current docs").call()
}
def result = git.push().call()
}
void config(String directory, List<FineractPluginExtension.FineractPluginConfigGitSection> sections) {
Git git = Git.open(new File(directory));
StoredConfig gitConfig = git.getRepository().getConfig();
sections.forEach(section -> {
gitConfig.setString(section.section, section.subsection, section.name, section.value);
})
// gitConfig.setString("branch", "master", "merge", "refs/heads/master");
gitConfig.save();
}
void createTag(String name, String message) {
def ref = git.tag()
.setName(name)
.setMessage(message)
.setAnnotated(true)
.setForceUpdate(true)
.call()
try {
git.push().setPushTags().setForce(true).setDryRun(dryRun).call()
log.warn("Tag created: ${name} (${ref.name})")
} catch(Exception e) {
log.error(e.toString(), e)
}
}
// TODO: explicitly provide the directory
void removeTag(String name) {
git.tagDelete().setTags(name).call()
RefSpec refSpec = new RefSpec(":refs/tags/${name}");
git.push().setRefSpecs(refSpec).setRemote("origin").call()
log.warn("Tag deleted: ${name}")
}
}
@@ -0,0 +1,158 @@
/**
* 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.
*/
package org.apache.fineract.gradle.service
import org.apache.fineract.gradle.FineractPluginExtension
import org.apache.fineract.gradle.FineractPluginExtension.FineractPluginConfigGpg
import org.bouncycastle.bcpg.ArmoredOutputStream
import org.bouncycastle.bcpg.BCPGOutputStream
import org.bouncycastle.gpg.keybox.BlobType
import org.bouncycastle.gpg.keybox.PublicKeyRingBlob
import org.bouncycastle.gpg.keybox.bc.BcKeyBox
import org.bouncycastle.jce.provider.BouncyCastleProvider
import org.bouncycastle.openpgp.*
import org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator
import org.bouncycastle.openpgp.operator.bc.BcPGPContentSignerBuilder
import org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import java.security.GeneralSecurityException
import java.security.MessageDigest
import java.security.Security
class GpgService {
private static final Logger log = LoggerFactory.getLogger(GpgService.class)
private PGPPrivateKey privateKey;
private PGPPublicKey publicKey;
static {
Security.addProvider(new BouncyCastleProvider());
}
GpgService(FineractPluginConfigGpg config) {
// TODO: provide implementation for *.gpg key rings
def keyBox = config.publicKeyring.endsWith(".kbx") ? new BcKeyBox(new FileInputStream(config.publicKeyring)) : null
if(keyBox) {
for(def keyBlob : keyBox.getKeyBlobs()) {
switch (keyBlob.type) {
case BlobType.X509_BLOB:
break
case BlobType.OPEN_PGP_BLOB:
def publicKeyRing = (keyBlob as PublicKeyRingBlob).getPGPPublicKeyRing();
def iterator = publicKeyRing.getPublicKeys();
while (publicKey == null && iterator.hasNext()) {
def k = iterator.next();
if (k.isEncryptionKey()) {
def keyName = Long.toHexString(k.keyID).toUpperCase()
if(config.keyName.substring(config.keyName.length()-keyName.length()) == keyName) {
publicKey = k;
log.warn("Found: ${publicKey.getUserIDs().next()}")
break
} else {
log.warn("Key mismatch: ${config.keyName} <-> ${keyName}")
}
}
}
break
}
}
PGPSecretKeyRingCollection secretRingCollection = new PGPSecretKeyRingCollection(new FileInputStream(config.secretKeyring), new BcKeyFingerprintCalculator())
def secretKey = secretRingCollection.getSecretKey(publicKey.keyID)
if(secretKey!=null) {
this.privateKey = secretKey.extractPrivateKey(new JcePBESecretKeyDecryptorBuilder().setProvider(BouncyCastleProvider.PROVIDER_NAME).build(config.password.toCharArray()))
}
} else {
log.warn("Could not open the public key ring.")
}
}
void sign(FineractPluginExtension.FineractPluginGpgParams params) {
params.files.findAll {
InputStream is = new FileInputStream(it)
BCPGOutputStream os = new BCPGOutputStream(new ArmoredOutputStream(new FileOutputStream(it + ".asc")))
sign(is).encode(os)
os.close();
}
}
PGPSignature sign(InputStream is) throws IOException, PGPException, GeneralSecurityException {
PGPSignatureGenerator generator = new PGPSignatureGenerator(new BcPGPContentSignerBuilder(publicKey.getAlgorithm(), PGPUtil.SHA1));
generator.init(PGPSignature.BINARY_DOCUMENT, privateKey);
byte[] buf = new byte[4096];
int len;
while ((len = is.read(buf)) >= 0) {
generator.update(buf, 0, len);
}
return generator.generate();
}
void md5(FineractPluginExtension.FineractPluginGpgParams params) {
params.files.findAll {
def result = calc(new FileInputStream(it), MessageDigest.getInstance("MD5", BouncyCastleProvider.PROVIDER_NAME))
def file = new File("${it}.md5")
file.write result
}
}
void sha512(FineractPluginExtension.FineractPluginGpgParams params) {
params.files.findAll {
def result = calc(new FileInputStream(it), MessageDigest.getInstance("SHA-512", BouncyCastleProvider.PROVIDER_NAME))
def file = new File("${it}.sha512")
file.write result
}
}
private static String calc(InputStream is, MessageDigest digest) {
String output
int read
byte[] buffer = new byte[8192]
try {
while ((read = is.read(buffer)) > 0) {
digest.update(buffer, 0, read)
}
byte[] hash = digest.digest()
BigInteger bigInt = new BigInteger(1, hash)
output = bigInt.toString(16)
while ( output.length() < 32 ) {
output = "0"+output
}
} catch (Exception e) {
log.error(e.toString(), e)
return null
}
return output
}
}
@@ -0,0 +1,324 @@
/**
* 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.
*/
package org.apache.fineract.gradle.service
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.ObjectMapper
import okhttp3.*
import okhttp3.logging.HttpLoggingInterceptor
import org.apache.fineract.gradle.FineractPluginExtension
import org.jetbrains.annotations.NotNull
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import retrofit2.Call
import retrofit2.Retrofit
import retrofit2.converter.jackson.JacksonConverterFactory
import retrofit2.http.*
import java.util.concurrent.TimeUnit
class JiraService {
private static final Logger log = LoggerFactory.getLogger(JiraService.class)
private JiraApi api
JiraService(FineractPluginExtension.FineractPluginConfigJira config) {
def credentials = Credentials.basic(config.username, config.password)
final ConnectionPool connectionPool = new ConnectionPool(5, 60, TimeUnit.SECONDS);
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(log::debug)
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY)
OkHttpClient.Builder okClient = new OkHttpClient.Builder()
.connectionPool(connectionPool)
.addInterceptor(loggingInterceptor)
.addInterceptor(new Interceptor() {
@Override
Response intercept(@NotNull Interceptor.Chain chain) throws IOException {
def request = chain.request()
request = request.newBuilder().header("Authorization", credentials).build()
return chain.proceed(request)
}
})
ObjectMapper mapper = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
Retrofit.Builder builder = new Retrofit.Builder()
.baseUrl(config.url)
.client(okClient.build())
.addConverterFactory(JacksonConverterFactory.create(mapper))
Retrofit retrofit = builder.build()
this.api = retrofit.create(JiraApi.class)
}
Map<String, Object> serverInfo() {
return this.api.serverInfo.execute().body()
}
FineractPluginExtension.FineractPluginJiraParams search(FineractPluginExtension.FineractPluginJiraParams params) {
def query = [:]
query['jql'] = params.query
query['startAt'] = params.pageOffset?:0
query['maxResults'] = params.pageSize?:50
// query['expand'] = [
// "names",
// "schema",
// "operations"
// ]
// query['fields'] = params.fields?:"*all"
query['fields'] = params.includes?:[
"summary",
"status",
"assignee",
"fixVersions"
]
// params.total = params.total?:1000
params.total = 1000
def result = this.api.searchIssues(query).execute().body()
params.result.addAll(result?.issues as List)
if(result?.issues.size()>=params.pageSize && params.result.size() < params.total) {
params.pageOffset += params.pageSize
search(params);
}
return params
}
List getProjects() {
return this.api.getProjects()?.execute()?.body()
}
List getProjectVersions(String projectId) {
return this.api.getProjectVersions(projectId)?.execute()?.body()
}
JiraVersion getVersion(String id) {
return this.api.getVersion(id)?.execute()?.body()
}
void updateVersion(JiraVersion version) {
this.api.updateVersion(version.id, version).execute()
}
static class JiraVersion {
String self
String id
String description
String name
boolean archived
boolean released
String releaseDate
String userReleaseDate
String project
Integer projectId
}
static class JiraSearchResult {
String expand
Integer startAt
Integer maxResults
Integer total
List<JiraIssue> issues
List<String> warningMessages
Map<String, Object> names
Map<String, Object> schema
}
static class JiraIssue {
String expand
String self
String id
String key
Map<String, Object> renderedFields
Map<String, Object> properties
Map<String, Object> names
Map<String, Object> schema
Map<String, Object> fields
}
static class JiraIssueUpdateRequest {
Map<String, Map<String, Object>> historyMetadata
Map<String, List<Map<String, Object>>> update
Map<String, Object> fields
Map<String, List<Map<String, Object>>> properties
}
static interface JiraApi {
// Server Info
@GET("serverInfo")
Call<Map<String, Object>> getServerInfo()
// Components
@GET("component/{id}")
Call<Object> getComponent(@Path("id") String id)
@POST("component")
Call<Object> createComponent(@Body Object component)
@PUT("component/{id}")
Call<Void> updateComponent(@Path("id") String id, @Body Object component)
@GET("component/{id}/relatedIssueCounts")
Call<Object> getComponentIssueCount(@Path("id") String id)
// Issue
@GET("issue/{issueIdOrKey}")
Call<Object> getIssue(@Path("issueIdOrKey") String issueIdOrKey)
@POST("issue")
Call<Object> createIssue(@Body Object issue)
@PUT("issue/{issueIdOrKey}")
Call<Object> updateIssue(@Path("issueIdOrKey") String issueIdOrKey, @Body Object issue, @QueryMap Map<String, String> queryMap)
@POST("issue/bulk")
Call<Object> createIssues(@Body Object issues)
@PUT("issue/{issueIdOrKey}/assignee")
Call<Void> assignIssue(@Path("issueIdOrKey") String issueIdOrKey, @Body Object user)
@GET("issue/{issueIdOrKey}/comment")
Call<Object> getComments(@Path("issueIdOrKey") String issueIdOrKey)
@POST("issue/{issueIdOrKey}/comment")
Call<Object> addComment(@Path("issueIdOrKey") String issueIdOrKey, @Body Object comment)
@PUT("issue/{issueIdOrKey}/comment/{id}")
Call<Object> updateComment(@Path("issueIdOrKey") String issueIdOrKey, @Path("id") String id, @Body Object comment)
@GET("issue/{issueIdOrKey}/comment/{id}")
Call<Object> getComment(@Path("issueIdOrKey") String issueIdOrKey, @Path("id") String id)
@POST("issue/{issueIdOrKey}/notify")
Call<Void> notifyIssue(@Path("issueIdOrKey") String issueIdOrKey, @Body Object notify)
@GET("issue/{issueIdOrKey}/transitions?expand=transitions.fields")
Call<Object> getTransitions(@Path("issueIdOrKey") String issueIdOrKey)
@POST("issue/{issueIdOrKey}/transitions")
Call<Void> transitionIssue(@Path("issueIdOrKey") String issueIdOrKey, @Body Object issue)
@GET("issue/{issueIdOrKey}/watchers")
Call<Object> getIssueWatches(@Path("issueIdOrKey") String issueIdOrKey)
@POST("issue/{issueIdOrKey}/watchers")
Call<Void> addIssueWatcher(@Path("issueIdOrKey") String issueIdOrKey, @Body String user)
// Remote Issue Links
@GET("issue/{issueIdOrKey}/remotelink")
Call<Object> getIssueRemoteLinks(@Path("issueIdOrKey") String issueIdOrKey, @Query("globalId") String globalId)
@GET("issue/{issueIdOrKey}/remotelink/{linkId}")
Call<Object> getIssueRemoteLink(@Path("issueIdOrKey") String issueIdOrKey, @Path("linkId") String linkId)
@POST("issue/{issueIdOrKey}/remotelink")
Call<Object> createIssueRemoteLink(@Path("issueIdOrKey") String issueIdOrKey, @Body Object issueLink)
@POST("issue/{issueIdOrKey}/remotelink/{linkId}")
Call<Object> updateIssueRemoteLink(@Path("issueIdOrKey") String issueIdOrKey, @Path("linkId") String linkId, @Body Object issueLink)
@DELETE("issue/{issueIdOrKey}/remotelink")
Call<Object> deleteIssueRemoteLinks(@Path("issueIdOrKey") String issueIdOrKey, @Query("globalId") String globalId)
@DELETE("issue/{issueIdOrKey}/remotelink/{linkId}")
Call<Object> deleteIssueRemoteLink(@Path("issueIdOrKey") String issueIdOrKey, @Path("linkId") String linkId)
// Issue Links
@POST("issueLink")
Call<Void> createIssueLink(@Body Object issueLink)
@GET("issueLink/{linkId}")
Call<Object> getIssueLink(@Path("linkId") String linkId)
@DELETE("issueLink/{linkId}")
Call<Object> deleteIssueLink(@Path("linkId") String linkId)
// Issue Link Types
@GET("issueLinkType")
Call<Object> getIssueLinkTypes()
// Project
@GET("project?expand=lead,description")
Call<List> getProjects()
@GET("project/{projectIdOrKey}")
Call<Object> getProject(@Path("projectIdOrKey") String projectId)
@GET("project/{projectIdOrKey}/statuses")
Call<Object> getProjectStatuses(@Path("projectIdOrKey") String projectId)
@GET("project/{projectIdOrKey}/components")
Call<Object> getProjectComponents(@Path("projectIdOrKey") String projectId)
@GET("project/{projectIdOrKey}/versions")
Call<List<JiraVersion>> getProjectVersions(@Path("projectIdOrKey") String projectId)
// Search
@POST("search")
Call<JiraSearchResult> searchIssues(@Body Map<String, Object> search)
// Version
@POST("version")
Call<JiraVersion> createVersion(@Body JiraVersion version)
@GET("version/{id}")
Call<JiraVersion> getVersion(@Path("id") String id)
@PUT("version/{id}")
Call<Void> updateVersion(@Path("id") String id, @Body JiraVersion version)
// Fields
@GET("field")
Call<Object> getFields()
@POST("field")
Call<Object> createField(@Body Object field)
// Users
@GET("user/search")
Call<Object> userSearch(@Query("username") String userName, @Query("startAt") int startAt, @Query("maxResults") int maxResults)
@GET("user/assignable/search")
Call<Object> assignableUserSearch(@Query("username") String userName, @Query("project") String project, @Query("issueKey") String issueKey, @Query("startAt") int startAt, @Query("maxResults") int maxResults)
@Multipart
@retrofit2.http.Headers("X-Atlassian-Token: no-check")
@POST("issue/{issueIdOrKey}/attachments")
Call<Object> uploadAttachment(@Path("issueIdOrKey") String issueIdOrKey, @Part MultipartBody.Part file)
@GET("attachment/{attachmentId}")
Call<Object> getAttachment(@Path("attachmentId") String attachmentId)
@DELETE("attachment/{attachmentId}")
Call<Object> deleteAttachment(@Path("attachmentId") String attachmentId)
@Streaming
@GET
Call<ResponseBody> downloadFileWithDynamicUrl(@Url String fileUrl)
}
}
@@ -0,0 +1,74 @@
/**
* 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.
*/
package org.apache.fineract.gradle.service
import org.apache.fineract.gradle.FineractPluginExtension
import org.gradle.api.GradleException
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import org.tmatesoft.svn.core.SVNCancelException
import org.tmatesoft.svn.core.SVNDepth
import org.tmatesoft.svn.core.SVNException
import org.tmatesoft.svn.core.SVNURL
import org.tmatesoft.svn.core.wc.*
class SubversionService {
private static final Logger log = LoggerFactory.getLogger(SubversionService.class)
private SVNUpdateClient client;
private String revision;
SubversionService(FineractPluginExtension.FineractPluginConfigSubversion config) {
ISVNOptions options = SVNWCUtil.createDefaultOptions(true)
SVNClientManager clientManager = SVNClientManager.newInstance(options, SVNWCUtil.createDefaultAuthenticationManager(config.username, config.password))
this.client = clientManager.updateClient;
this.client.ignoreExternals = false
this.client.eventHandler = new ISVNEventHandler() {
@Override
void handleEvent(SVNEvent event, double progress) throws SVNException {
println ">>> PROGRESS: ${progress>0?:'-'}"
}
@Override
void checkCancelled() throws SVNCancelException {
}
}
this.revision = config.revision
}
void checkout(FineractPluginExtension.FineractPluginSubversionParams params) {
SVNURL svnUrl = SVNURL.parseURIEncoded(params.url)
SVNRevision svnRevision = this.revision == null ? SVNRevision.HEAD : SVNRevision.parse(this.revision)
if (svnRevision == SVNRevision.UNDEFINED) {
throw new GradleException("Invalid SVN revision: " + this.revision)
}
this.client.doCheckout(svnUrl, new File(params.directory), SVNRevision.HEAD, svnRevision, SVNDepth.INFINITY, false)
}
void commit(FineractPluginExtension.FineractPluginSubversionParams params) {
// TODO: implement this
SVNURL svnUrl = SVNURL.parseURIEncoded(params.url)
}
}
@@ -0,0 +1,84 @@
/**
* 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.
*/
package org.apache.fineract.gradle.service
import freemarker.core.Environment
import freemarker.template.Configuration
import freemarker.template.Template
import freemarker.template.TemplateException
import freemarker.template.TemplateExceptionHandler
import org.apache.fineract.gradle.FineractPluginExtension
import org.slf4j.Logger
import org.slf4j.LoggerFactory
class TemplateService {
private static final Logger log = LoggerFactory.getLogger(TemplateService.class)
private Configuration config
TemplateService(FineractPluginExtension.FineractPluginConfigTemplate config) {
def dir = new File(config.templateDir);
this.config = new Configuration(Configuration.VERSION_2_3_31);
this.config.setDirectoryForTemplateLoading(dir)
this.config.setDefaultEncoding("UTF-8");
this.config.setLogTemplateExceptions(false);
this.config.setWrapUncheckedExceptions(true);
this.config.setFallbackOnNullLoopVariable(false);
this.config.setTemplateExceptionHandler(new TemplateExceptionHandler() {
@Override
void handleTemplateException(TemplateException te, Environment env, Writer out) throws TemplateException {
if (!env.isInAttemptBlock()) {
PrintWriter pw = (out instanceof PrintWriter) ? (PrintWriter) out : new PrintWriter(out);
pw.print("FreeMarker template error\n");
te.printStackTrace(pw, false, true, false);
pw.flush(); // To commit the HTTP response
}
}}
)
}
FineractPluginExtension.FineractPluginTemplateParams render(FineractPluginExtension.FineractPluginTemplateParams params, Object data) {
Template template = null;
if(params.templateFile) {
template = new Template("template", new FileReader(new File(params.templateFile)), this.config)
}
if(params.template) {
template = new Template("template", new StringReader(params.template), this.config)
}
if(template) {
if(params.outputFile) {
def output = new File(params.outputFile)
output.createNewFile()
template.process(data, new FileWriter(output, false))
} else {
def output = new StringWriter()
template.process(data, output)
params.output = output.toString()
}
}
return params
}
}
@@ -0,0 +1,20 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
implementation-class=org.apache.fineract.gradle.FineractPlugin
@@ -0,0 +1,34 @@
<#--
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.
-->
<h1>Release Artifacts</h1>
<p>
<ac:structured-macro ac:macro-id="ac1cb3cb-84d4-45aa-820b-05cc42d39dd9" ac:name="jira" ac:schema-version="1">
<ac:parameter ac:name="server">ASF JIRA</ac:parameter>
<ac:parameter ac:name="columnIds">issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,customfield_12311032,customfield_12311037,customfield_12311022,customfield_12311027,priority,status,resolution</ac:parameter>
<ac:parameter ac:name="columns">key,summary,type,created,updated,due,assignee,reporter,Priority,Priority,Priority,Priority,priority,status,resolution</ac:parameter>
<ac:parameter ac:name="maximumIssues">50</ac:parameter>
<ac:parameter ac:name="jqlQuery">project = FINERACT AND fixVersion = ${project['fineract.release.version']} AND status not in (Open) </ac:parameter>
<ac:parameter ac:name="serverId">5aa69414-a9e9-3523-82ec-879b028fb15b</ac:parameter>
</ac:structured-macro>
</p>
<p>
<br/>
</p>
@@ -0,0 +1,39 @@
<#--
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.
-->
Hello everyone,
... based on our "How to Release Apache Fineract" process documented at https://cwiki.apache.org/confluence/x/DRwIB:
I will create a ${project['fineract.release.version']} branch off develop in our git repository at https://github.com/apache/fineract on ${project['fineract.release.date']}.
The release tracking umbrella issue for tracking all activity in JIRA is FINERACT-${project['fineract.release.issue']!'0000'} (https://issues.apache.org/jira/browse/FINERACT-${project['fineract.release.issue']!'0000'}) for this Fineract ${project['fineract.release.version']}.
If you have any work in progress that you would like to see included in this release, please add "blocking" links to the release JIRA issue.
I am the release manager for this release.
Cheers,
${project['fineract.config.name']}
🎉 Powered by Fineract Release Plugin 🎊
@@ -0,0 +1,21 @@
<#--
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.
-->
[FINERACT] [PROPOSAL] 📦 New release ${project['fineract.release.version']}
@@ -0,0 +1,35 @@
<#--
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.
-->
Hello everyone,
... as previously announced, I've just created the release branch for our upcoming ${project['fineract.release.version']} release.
You can continue working and merging PRs to the develop branch for future releases, as always.
The DRAFT release notes are on https://cwiki.apache.org/confluence/display/FINERACT/${project['fineract.release.version']}+-+Apache+Fineract. Does anyone see anything missing?
Does anyone have any last minutes changes they would like to see cherry-picked to branch ${project['fineract.release.version']}, or are we good go and actually cut the release based on this branch as it is?
I'll initiate the final stage of actually creating the release on ${project['fineract.release.date']} if nobody objects.
Cheers,
${project['fineract.config.name']}
@@ -0,0 +1,21 @@
<#--
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.
-->
[FINERACT] [ANNOUNCE] 🔀 ${project['fineract.release.version']} release branch
@@ -0,0 +1,43 @@
<#--
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.
-->
Hello everyone,
... we have created Apache Fineract ${project['fineract.release.version']} release, with the artifacts below up for a vote.
It fixes the following issues: https://cwiki.apache.org/confluence/display/FINERACT/${project['fineract.release.version']}+-+Apache+Fineract
Source & Binary files : https://dist.apache.org/repos/dist/dev/fineract/${project['fineract.release.version']}/
Tag to be voted on (rc#): https://gitbox.apache.org/repos/asf?p=fineract.git;a=commit;h=refs/heads/${project['fineract.release.version']}
Fineract's KEYS containing the PGP key we used to sign the release: https://dist.apache.org/repos/dist/dev/fineract/KEYS
Note that this release contains source and binary artifacts.
This vote will be open for 72 hours:
[ ] +1 approve
[ ] +0 no opinion
[ ] -1 disapprove (and reason why)
Cheers,
${project['fineract.config.name']}
@@ -0,0 +1,21 @@
<#--
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.
-->
[FINERACT] [VOTE] 🗳️ ${project['fineract.release.version']} for release
@@ -0,0 +1,89 @@
<#--
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.
-->
<#if (project['fineract.vote'].approve.binding?size + project['fineract.vote'].approve.nonBinding?size > project['fineract.vote'].disapprove.binding?size + project['fineract.vote'].disapprove.nonBinding?size)>
Voting is now closed and has passed with the following tally,
Binding +1s: ${project['fineract.vote'].approve.binding?size}
Non binding +1s: ${project['fineract.vote'].approve.nonBinding?size}
<#else>
Voting is now closed and has not passed with the following tally,
Binding +1s: ${project['fineract.vote'].approve.binding?size}
Non binding +1s: ${project['fineract.vote'].approve.nonBinding?size}
Binding -1s: ${project['fineract.vote'].disapprove.binding?size}
Non binding -1s: ${project['fineract.vote'].disapprove.nonBinding?size}
</#if>
Here are the detailed results:
<#list project['fineract.vote'].approve.binding>
Binding +1s:
<#items as item>
- ${item.name} (${item.email})
</#items>
</#list>
<#list project['fineract.vote'].approve.nonBinding>
Non binding +1s:
<#items as item>
- ${item.name} (${item.email})
</#items>
</#list>
<#list project['fineract.vote'].disapprove.binding>
Binding -1s:
<#items as item>
- ${item.name} (${item.email})
</#items>
</#list>
<#list project['fineract.vote'].disapprove.nonBinding>
Non binding -1s:
<#items as item>
- ${item.name} (${item.email})
</#items>
</#list>
<#list project['fineract.vote'].noOpinion.binding>
Binding +0s:
<#items as item>
- ${item.name} (${item.email})
</#items>
</#list>
<#list project['fineract.vote'].noOpinion.nonBinding>
Non binding +0s:
<#items as item>
- ${item.name} (${item.email})
</#items>
</#list>
<#if (project['fineract.vote'].approve.binding?size + project['fineract.vote'].approve.nonBinding?size > project['fineract.vote'].disapprove.binding?size + project['fineract.vote'].disapprove.nonBinding?size)>
Thanks to everyone who voted! I'll now continue with the rest of the release process.
<#else>
Thanks to everyone who voted! Looks like we have to repeat the vote.
</#if>
${project['fineract.config.name']}
@@ -0,0 +1,21 @@
<#--
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.
-->
[FINERACT] [VOTE] [RESULT] 🧾️ ${project['fineract.release.version']} for release
@@ -0,0 +1,43 @@
<#--
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.
-->
The Apache Fineract project is pleased to announce
the release of Apache Fineract ${project['fineract.release.version']}.
The release is available for download from
https://fineract.apache.org/#downloads
Fineract provides a reliable, robust, and affordable solution for entrepreneurs,
financial institutions, and service providers to offer financial services to the
world’s 2 billion underbanked and unbanked. Fineract is aimed at innovative mobile
and cloud-based solutions, and enables digital transaction accounts for all.
This release addressed ${project['fineract.release.issues']?size} issues.
Readme: https://github.com/apache/fineract/blob/${project['fineract.release.version']}/README.md
Release page: https://cwiki.apache.org/confluence/display/FINERACT/${project['fineract.release.version']}+-+Apache+Fineract
List of fixed issues:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=${project['fineract.release.versionId']}&styleName=Html&projectId=${project['fineract.release.projectId']}
For more information on Apache Fineract please visit
project home page: https://fineract.apache.org
The Apache Fineract Team
@@ -0,0 +1,21 @@
<#--
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.
-->
[ANNOUNCE] Apache Fineract ${project['fineract.release.version']} Release
@@ -0,0 +1,21 @@
<#--
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.
-->
Fineract ${project['fineract.release.version']} release
@@ -0,0 +1,38 @@
<#--
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.
-->
[INSTRUCTIONS:START]
As discussed in https://issues.apache.org/jira/browse/FINERACT-1154, now that everything is final, please do the following to remove the release branch (and just keep the tag),
and make sure that everything on the release tag is merged to develop and that e.g. git describe works:
>> git checkout develop
>> git branch -D ${project['fineract.release.version']}
>> git push origin :${project['fineract.release.version']}
>> git checkout develop
>> git checkout -b merge-${project['fineract.release.version']}
>> git merge -s recursive -Xignore-all-space ${project['fineract.release.version']}
>> git commit
>> git push <USER>
>> hub pull-request
[INSTRUCTIONS:END]
@@ -0,0 +1,28 @@
<#--
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.
-->
[INSTRUCTIONS:START]
Finally update the https://fineract.apache.org website with the latest release details.
The website's HTML source code is available at https://github.com/apache/fineract-site.
[INSTRUCTIONS:END]
@@ -0,0 +1,39 @@
<#--
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.
-->
[INSTRUCTIONS:START]
Before a release is done, make sure that any issues that are fixed have their fix version setup correctly.
"project = FINERACT and resolution = fixed and fixVersion is empty"
Move all unresolved JIRA issues which have this release as Fix Version to the next release
"project = FINERACT and fixVersion = ${project['fineract.release.version']} and status not in ( Resolved, Done, Accepted, Closed )"
You can also run the following query to make sure that the issues fixed for the to-be-released version look accurate:
"project = FINERACT and fixVersion = ${project['fineract.release.version']}"
Finally, check out the output of the JIRA release note tool to see which tickets are included in the release, in order to do a sanity check.
[INSTRUCTIONS:END]
@@ -0,0 +1,29 @@
<#--
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.
-->
[INSTRUCTIONS:START]
You first need to close the release in JIRA so that the about to be released version cannot be used as "fixVersion" for new bugs anymore.
Go to JIRA "Administer project" page and follow "Versions" in left menu. Table with list of all releases should appear, click on additional menu on the right of your release and choose "Release" option.
Submit release date and you're done.
[INSTRUCTIONS:END]
@@ -0,0 +1,38 @@
<#--
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.
-->
[INSTRUCTIONS:START]
Following are the typical things we need to verify before voting on a release candidate. And the release manager should verify them too before calling out a vote.
Make sure release artifacts are hosted at https://dist.apache.org/repos/dist/dev/fineract
* Release candidates should be in format apache-fineract-${project['fineract.release.version']}-binary.tar.gz
* Verify signatures and hashes. You may have to import the public key of the release manager to verify the signatures. (`gpg --recv-key <key id>`)
* Git tag matches the released bits (diff -rf)
* Can compile successfully from source
* Verify DISCLAIMER, NOTICE and LICENSE (year etc)
* All files have correct headers (Rat check should be clean - gradlew rat)
* No jar files in the source artifacts
* Integration tests should work
[INSTRUCTIONS:END]
@@ -0,0 +1,33 @@
<#--
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.
-->
= Changelog
== Breaking Changes
<#list issues?filter(i -> i.fields.labels?seq_contains("BreakingChange")) as issue>
* [[${issue.key}]]${issue.key} - ${issue.fields.summary}
</#list>
== Issues
<#list issues as issue>
* [[${issue.key}]]${issue.key} - ${issue.fields.summary}
</#list>
@@ -0,0 +1,26 @@
<#--
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.
-->
Changelog
=========
<#list issues as issue>
* ${issue.key} - ${issue.fields.summary}
</#list>
@@ -0,0 +1,96 @@
{
"approve": {
"binding": [
{
"name": "James Daily",
"email": "jamespdailey@gmail.com"
},
{
"name": "Arnold Galovics",
"email": "arnold@apache.org"
},
{
"name": "Avik Ganguly",
"email": "avik@fynarfin.io"
},
{
"name": "Ed Cable",
"email": "edcable@mifos.org"
},
{
"name": "Aleksandar Vidakovic",
"email": "aleks@apache.org"
},
{
"name": "Terence Monteiro",
"email": "terence.placker@gmail.com"
},
{
"name": "Awasum Yannick",
"email": "awasum@apache.org"
}
],
"nonBinding": [
{
"name": "Victor Manuel Romero Rodriguez",
"email": "victor.romero@fintecheando.mx"
},
{
"name": "Bruce Tushabe",
"email": "brucetushabe@gmail.com"
},
{
"name": "Kigred",
"email": "kigred.developer@gmail.com"
},
{
"name": "Bharath Gowda",
"email": "bgowda@mifos.org"
},
{
"name": "Robert Jakech",
"email": "robert@fiter.io"
},
{
"name": "Arthur Magezi",
"email": "artmagezi@gmail.com"
},
{
"name": "Robert Ippez",
"email": "ippezrobert@gmail.com"
},
{
"name": "Sifiso Mtetwa",
"email": "sifiso@skyburgsystems.org"
},
{
"name": "Zayad A. Said",
"email": "zayyad@intrasofttechnologies.com"
},
{
"name": "Hitech Prajapati",
"email": "hitesh.kams.prajapati@gmail.com"
},
{
"name": "Kelvin Ikome",
"email": "kelvin@ciniter.com"
},
{
"name": "Nasser Kaze",
"email": "kazenasser@gmail.com"
}
]
},
"disapprove": {
"binding": [
],
"nonBinding": [
]
},
"noOpinion": {
"binding": [
],
"nonBinding": [
]
}
}
@@ -0,0 +1,22 @@
{
"approve": {
"binding": [
{
"name": "Some Body",
"email": "bob@apache.org"
}
]
},
"disapprove": {
"binding": [
],
"nonBinding": [
]
},
"noOpinion": {
"binding": [
],
"nonBinding": [
]
}
}
+20
View File
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<FindBugsFilter
xmlns="https://github.com/spotbugs/filter/3.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+25
View File
@@ -0,0 +1,25 @@
/**
* 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.
*/
description = 'ACME Corp.: Fineract COB Loan'
group = 'com.acme.fineract'
archivesBaseName = 'acme-fineract-loan-cob'
apply from: 'dependencies.gradle'
+23
View File
@@ -0,0 +1,23 @@
/**
* 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.
*/
dependencies {
implementation(project(':fineract-provider'))
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
}
@@ -0,0 +1,60 @@
/**
* 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.
*/
package com.acme.fineract.loan.cob;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.fineract.cob.loan.LoanCOBBusinessStep;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
import org.apache.fineract.portfolio.loanaccount.domain.LoanAccountDomainService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;
@Slf4j
@Component
@RequiredArgsConstructor
public class AcmeNoopBusinessStep implements LoanCOBBusinessStep, InitializingBean {
private static final String ENUM_STYLED_NAME = "ACME_LOAN_NOOP";
private static final String HUMAN_READABLE_NAME = "ACME Loan Noop";
// NOTE: just to demonstrate that dependency injection is working
private final LoanAccountDomainService loanAccountDomainService;
@Override
public void afterPropertiesSet() throws Exception {
log.warn("Acme COB Loan: '{}'", getClass().getCanonicalName());
}
@Override
public Loan execute(Loan input) {
return input;
}
@Override
public String getEnumStyledName() {
return ENUM_STYLED_NAME;
}
@Override
public String getHumanReadableName() {
return HUMAN_READABLE_NAME;
}
}
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
<changeSet author="acme" id="1">
<insert tableName="m_batch_business_steps">
<column name="job_name" value="LOAN_CLOSE_OF_BUSINESS"/>
<column name="step_name" value="ACME_LOAN_NOOP"/>
<column name="step_order" value="5"/>
</insert>
</changeSet>
</databaseChangeLog>
+25
View File
@@ -0,0 +1,25 @@
/**
* 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.
*/
description = 'ACME Corp.: Fineract Loan Job'
group = 'com.acme.fineract'
archivesBaseName = 'acme-fineract-loan-job'
apply from: 'dependencies.gradle'
+24
View File
@@ -0,0 +1,24 @@
/**
* 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.
*/
dependencies {
implementation(project(':fineract-provider'))
implementation('org.springframework.batch:spring-batch-integration')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
}
@@ -16,17 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.notification.service;
package com.acme.fineract.loan.job;
import java.util.Collection;
import org.apache.fineract.notification.data.TopicData;
public enum AcmeJobName {
public interface TopicReadPlatformService {
ACME_NOOP_JOB("Acme Noop Job");
Collection<TopicData> getAllTopics();
private final String name;
Collection<TopicData> getAllEnabledTopics();
TopicData findById(Long id);
AcmeJobName(final String name) {
this.name = name;
}
@Override
public String toString() {
return this.name;
}
}
@@ -0,0 +1,35 @@
/**
* 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.
*/
package com.acme.fineract.loan.job;
import java.util.List;
import org.apache.fineract.infrastructure.jobs.service.jobname.JobNameData;
import org.apache.fineract.infrastructure.jobs.service.jobname.JobNameProvider;
import org.apache.fineract.infrastructure.jobs.service.jobname.SimpleJobNameProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AcmeJobNameConfig {
@Bean
public JobNameProvider acmeJobNameProvider() {
return new SimpleJobNameProvider(List.of(new JobNameData(AcmeJobName.ACME_NOOP_JOB.name(), AcmeJobName.ACME_NOOP_JOB.toString())));
}
}
@@ -0,0 +1,50 @@
/**
* 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.
*/
package com.acme.fineract.loan.job;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
import org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
import org.springframework.batch.core.launch.support.RunIdIncrementer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class AcmeNoopJobConfiguration {
@Autowired
private JobBuilderFactory jobs;
@Autowired
private StepBuilderFactory steps;
@Autowired
private AcmeNoopJobTasklet tasklet;
@Bean
protected Step acmeNoopJobStep() {
return steps.get(AcmeJobName.ACME_NOOP_JOB.name()).tasklet(tasklet).build();
}
@Bean
public Job acmeNoopJob() {
return jobs.get(AcmeJobName.ACME_NOOP_JOB.name()).start(acmeNoopJobStep()).incrementer(new RunIdIncrementer()).build();
}
}
@@ -0,0 +1,37 @@
/**
* 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.
*/
package com.acme.fineract.loan.job;
import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.RepeatStatus;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class AcmeNoopJobTasklet implements Tasklet {
@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
log.info("Acme custom job execution");
return RepeatStatus.FINISHED;
}
}
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
<changeSet author="acme" id="1">
<insert tableName="job">
<column name="name" value="Acme Noop Job"/>
<column name="display_name" value="Acme Noop Job"/>
<column name="cron_expression" value="0 1 0 1/1 * ? *"/>
<column name="create_time" valueDate="${current_datetime}"/>
<column name="task_priority" valueNumeric="5"/>
<column name="group_name"/>
<column name="previous_run_start_time"/>
<column name="job_key" value="Acme Noop Job _ DEFAULT"/>
<column name="initializing_errorlog"/>
<column name="is_active" valueBoolean="false"/>
<column name="currently_running" valueBoolean="false"/>
<column name="updates_allowed" valueBoolean="true"/>
<column name="scheduler_group" valueNumeric="0"/>
<column name="is_misfired" valueBoolean="false"/>
<column name="node_id" valueNumeric="1"/>
<column name="is_mismatched_job" valueBoolean="true"/>
</insert>
</changeSet>
</databaseChangeLog>
@@ -1,3 +1,4 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -16,35 +17,37 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.notification;
import static org.junit.Assert.assertEquals;
import javax.jms.JMSException;
import javax.jms.Session;
import javax.jms.TextMessage;
import com.acme.fineract.loan.job.AcmeNoopJobTasklet;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mockito;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.batch.repeat.RepeatStatus;
@ExtendWith(MockitoExtension.class)
public class ListenerTest {
public class AcmeNoopJobTaskletTest {
private Listener listener;
private Session session;
private TextMessage textMessageMock;
@Mock
private StepContribution stepContribution;
@Mock
private ChunkContext chunkContext;
private RepeatStatus resultStatus;
private AcmeNoopJobTasklet underTest;
@BeforeEach
public void setUp() {
listener = new Listener();
session = Mockito.mock(Session.class);
textMessageMock = Mockito.mock(TextMessage.class);
underTest = new AcmeNoopJobTasklet();
}
@Test
public void testListener() throws JMSException {
Mockito.when(textMessageMock.getText()).thenReturn("content");
listener.onMessage(textMessageMock, session);
Mockito.verify(textMessageMock).getText();
public void testJobExecution() throws Exception {
resultStatus = underTest.execute(stepContribution, chunkContext);
assertEquals(resultStatus, RepeatStatus.FINISHED);
}
}
+25
View File
@@ -0,0 +1,25 @@
/**
* 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.
*/
description = 'ACME Corp.: Fineract Loan Transaction Processors'
group = 'com.acme.fineract'
archivesBaseName = 'acme-fineract-loan-processor'
apply from: 'dependencies.gradle'
@@ -0,0 +1,22 @@
/**
* 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.
*/
dependencies {
implementation(project(':fineract-provider'))
}
@@ -0,0 +1,41 @@
/**
* 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.
*/
package com.acme.fineract.loan.processor;
import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.impl.FineractStyleLoanRepaymentScheduleTransactionProcessor;
import org.springframework.stereotype.Component;
@Component
public class AcmeLoanRepaymentScheduleTransactionProcessor extends FineractStyleLoanRepaymentScheduleTransactionProcessor {
private static final String STRATEGY_CODE = "acme-standard-strategy";
private static final String STRATEGY_NAME = "ACME Corp.: standard loan transaction processing strategy";
@Override
public String getCode() {
return STRATEGY_CODE;
}
@Override
public String getName() {
return STRATEGY_NAME;
}
}
+25
View File
@@ -0,0 +1,25 @@
/**
* 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.
*/
description = 'ACME Corp.: Fineract COB Starter'
group = 'com.acme.fineract'
archivesBaseName = 'acme-fineract-loan-starter'
apply from: 'dependencies.gradle'
@@ -0,0 +1,28 @@
/**
* 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.
*/
dependencies {
implementation(project(':fineract-provider'))
implementation(project(':custom:acme:loan:cob'))
implementation(project(':custom:acme:loan:processor'))
implementation('org.springframework.boot:spring-boot-starter')
testImplementation(project(':fineract-provider'))
testImplementation('org.springframework.boot:spring-boot-starter-jdbc')
testImplementation('org.springframework.boot:spring-boot-starter-data-jpa')
}
@@ -0,0 +1,43 @@
/**
* 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.
*/
package com.acme.fineract.loan.starter;
import com.acme.fineract.loan.processor.AcmeLoanRepaymentScheduleTransactionProcessor;
import java.util.List;
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleTransactionProcessorFactory;
import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.LoanRepaymentScheduleTransactionProcessor;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
@AutoConfiguration
@ComponentScans({ @ComponentScan("com.acme.fineract.loan.cob"), @ComponentScan("com.acme.fineract.loan.processor"),
@ComponentScan("com.acme.fineract.loan.job") })
@ConditionalOnProperty("acme.loan.enabled")
public class AcmeLoanAutoConfiguration {
@Bean
public LoanRepaymentScheduleTransactionProcessorFactory loanRepaymentScheduleTransactionProcessorFactory(
AcmeLoanRepaymentScheduleTransactionProcessor defaultLoanRepaymentScheduleTransactionProcessor,
List<LoanRepaymentScheduleTransactionProcessor> processors) {
return new LoanRepaymentScheduleTransactionProcessorFactory(defaultLoanRepaymentScheduleTransactionProcessor, processors);
}
}
@@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.acme.fineract.loan.starter.AcmeLoanAutoConfiguration
@@ -0,0 +1,69 @@
/**
* 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.
*/
package com.acme.fineract.loan.starter;
import static org.assertj.core.api.Assertions.assertThat;
import io.cucumber.java8.En;
import java.util.TreeMap;
import lombok.extern.slf4j.Slf4j;
import org.apache.fineract.cob.COBBusinessStep;
import org.apache.fineract.cob.COBBusinessStepService;
import org.apache.fineract.portfolio.loanaccount.domain.Loan;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
@Slf4j
public class AcmeBusinessStepDefinitions implements En {
private ApplicationContextRunner contextRunner;
private COBBusinessStepService businessStepService;
private COBBusinessStep<Loan> businessStep;
private TreeMap<Long, String> result;
public AcmeBusinessStepDefinitions() {
Given("/^An auto configuration (.*) and a service configuration (.*)$/",
(String autoConfigurationClassName, String configurationClassName) -> {
contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(Class.forName(autoConfigurationClassName)))
.withPropertyValues("acme.loan.enabled", "true")
.withUserConfiguration(Class.forName(configurationClassName.trim()));
});
When("/^The user retrieves the step service with step class (.*) and name (.*)$/", (String stepClass, String stepName) -> {
contextRunner.run((ctx) -> {
this.businessStepService = ctx.getBean(COBBusinessStepService.class);
this.businessStep = ctx.getBean((Class<COBBusinessStep<Loan>>) Class.forName(stepClass));
// TODO: not yet working, because no storage configured/mocked
this.result = businessStepService.getCOBBusinessStepMap(this.businessStep.getClass(), stepName);
});
});
Then("/^The step service should have a result$/", () -> {
assertThat(this.businessStep).isNotNull();
assertThat(this.result).isNotNull();
// log.warn(">>>>>>>>>>>>>>>>>> RESULT: {}", this.result);
});
}
}
@@ -0,0 +1,57 @@
/**
* 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.
*/
package com.acme.fineract.loan.starter;
import static org.mockito.Mockito.mock;
import org.apache.fineract.cob.COBBusinessStepService;
import org.apache.fineract.cob.COBBusinessStepServiceImpl;
import org.apache.fineract.cob.domain.BatchBusinessStepRepository;
import org.apache.fineract.infrastructure.core.config.FineractProperties;
import org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService;
import org.apache.fineract.portfolio.loanaccount.domain.LoanAccountDomainService;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
@EnableConfigurationProperties({ FineractProperties.class })
public class TestDefaultConfiguration {
@Bean
public BatchBusinessStepRepository batchBusinessStepRepository() {
return mock(BatchBusinessStepRepository.class);
}
@Bean
public BusinessEventNotifierService businessEventNotifierService() {
return mock(BusinessEventNotifierService.class);
}
@Bean
public COBBusinessStepService cobBusinessStepService(BatchBusinessStepRepository batchBusinessStepRepository,
ApplicationContext context, ListableBeanFactory beanFactory, BusinessEventNotifierService businessEventNotifierService) {
return new COBBusinessStepServiceImpl(batchBusinessStepRepository, context, beanFactory, businessEventNotifierService);
}
@Bean
public LoanAccountDomainService loanAccountDomainService() {
return mock(LoanAccountDomainService.class);
}
}
@@ -16,23 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.fineract.infrastructure.core.boot.tests;
package com.acme.fineract.loan.starter;
import org.apache.fineract.ServerWithMariaDB4jApplication;
import io.cucumber.spring.CucumberContextConfiguration;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.web.WebAppConfiguration;
@CucumberContextConfiguration
@ExtendWith(SpringExtension.class)
@SpringBootTest(classes = ServerWithMariaDB4jApplication.Configuration.class)
@TestPropertySource("classpath:application-test.properties")
@WebAppConfiguration
public abstract class AbstractSpringBootWithMariaDB4jIntegrationTest {
// do NOT put any helper methods here!
// it's much better to use composition instead of inheritance
// so write a test util ("fixture") and use it as a field in your test
public class TestSuite {
}
@@ -0,0 +1,20 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# test properties
@@ -0,0 +1,21 @@
#
# 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.
#
cucumber.publish.quiet=true
cucumber.glue=com.acme.fineract
@@ -0,0 +1,30 @@
#
# 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.
#
Feature: COB Feature
@modules
Scenario Outline: Verify that the dependency injection of steps into the step service works
Given An auto configuration <autoConfigurationClass> and a service configuration <configurationClass>
When The user retrieves the step service with step class <stepClass> and name <stepName>
Then The step service should have a result
Examples:
| autoConfigurationClass | configurationClass | stepClass | stepName |
| com.acme.fineract.loan.starter.AcmeLoanAutoConfiguration | com.acme.fineract.loan.starter.TestDefaultConfiguration | com.acme.fineract.loan.cob.AcmeNoopBusinessStep | ACME_LOAN_NOOP |
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
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.
-->
<configuration scan="false">
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>false</resetJUL>
</contextListener>
<appender name="STDOUT" target="System.out" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>true</withJansi>
<encoder>
<pattern>%green(%d{yyyy-MM-dd HH:mm:ss.SSS}) [%thread] %highlight(%-5level) %cyan(%logger{36}) - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.springframework.transaction" level="INFO" />
<logger name="org.springframework.data.convert" level="ERROR" />
<logger name="org.springframework.http.converter.json" level="ERROR" />
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>
+25
View File
@@ -0,0 +1,25 @@
/**
* 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.
*/
description = 'ACME Corp.: Fineract Note Service'
group = 'com.acme.fineract.portfolio.note'
archivesBaseName = 'acme-fineract-note-service'
apply from: 'dependencies.gradle'
@@ -0,0 +1,23 @@
/**
* 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.
*/
dependencies {
implementation(project(':fineract-provider'))
compileOnly('org.springframework.boot:spring-boot-autoconfigure')
}
@@ -0,0 +1,48 @@
/**
* 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.
*/
package com.acme.fineract.portfolio.note.service;
import java.util.Collection;
import lombok.extern.slf4j.Slf4j;
import org.apache.fineract.portfolio.note.data.NoteData;
import org.apache.fineract.portfolio.note.service.NoteReadPlatformService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;
@Slf4j
@Service
@ConditionalOnProperty("acme.note.enabled")
public class AcmeNoteReadPlatformService implements NoteReadPlatformService, InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
log.warn("Note Read Service: '{}'", getClass().getCanonicalName());
}
@Override
public NoteData retrieveNote(Long noteId, Long resourceId, Integer noteTypeId) {
return null;
}
@Override
public Collection<NoteData> retrieveNotesByResource(Long resourceId, Integer noteTypeId) {
return null;
}
}
@@ -0,0 +1,59 @@
/**
* 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.
*/
package com.acme.fineract.portfolio.note.service;
import lombok.extern.slf4j.Slf4j;
import org.apache.fineract.infrastructure.core.api.JsonCommand;
import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
import org.apache.fineract.portfolio.client.domain.Client;
import org.apache.fineract.portfolio.note.service.NoteWritePlatformService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;
@Slf4j
@Service
@ConditionalOnProperty("acme.note.enabled")
public class AcmeNoteWritePlatformService implements NoteWritePlatformService, InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
log.warn("Note Write Service: '{}'", getClass().getCanonicalName());
}
@Override
public CommandProcessingResult createNote(JsonCommand command) {
return null;
}
@Override
public CommandProcessingResult updateNote(JsonCommand command) {
return null;
}
@Override
public CommandProcessingResult deleteNote(JsonCommand command) {
return null;
}
@Override
public void createAndPersistClientNote(Client client, JsonCommand command) {
}
}
+25
View File
@@ -0,0 +1,25 @@
/**
* 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.
*/
description = 'ACME Corp.: Fineract Note Starter'
group = 'com.acme.fineract.portfolio.note'
archivesBaseName = 'acme-fineract-note-starter'
apply from: 'dependencies.gradle'
@@ -0,0 +1,26 @@
/**
* 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.
*/
dependencies {
implementation(project(':custom:acme:note:service'))
implementation('org.springframework.boot:spring-boot-starter')
testImplementation(project(':fineract-provider'))
testImplementation('org.springframework.boot:spring-boot-starter-jdbc')
testImplementation('org.springframework.boot:spring-boot-starter-data-jpa')
}
@@ -0,0 +1,28 @@
/**
* 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.
*/
package com.acme.fineract.portfolio.note.starter;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.ComponentScan;
@AutoConfiguration
@ComponentScan("com.acme.fineract.portfolio.note")
@ConditionalOnProperty("acme.note.enabled")
public class AcmeNoteAutoConfiguration {}
@@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.acme.fineract.portfolio.note.starter.AcmeNoteAutoConfiguration
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd">
<changeSet author="acme" id="1">
<createTable tableName="acme_note_dummy">
<column autoIncrement="true" name="id" type="BIGINT">
<constraints nullable="false" primaryKey="true"/>
</column>
<column name="name" type="VARCHAR(100)">
<constraints unique="true"/>
</column>
<column name="description" type="VARCHAR(500)"/>
</createTable>
</changeSet>
</databaseChangeLog>
@@ -0,0 +1,59 @@
/**
* 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.
*/
package com.acme.fineract.portfolio.note.starter;
import static org.assertj.core.api.Assertions.assertThat;
import io.cucumber.java8.En;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
public class AcmeNoteServiceStepDefinitions implements En {
private Class interfaceClass;
private Class implementationClass;
private ApplicationContextRunner contextRunner;
public AcmeNoteServiceStepDefinitions() {
Given("/^An auto configuration (.*) and a service configuration (.*)$/",
(String autoConfigurationClassName, String configurationClassName) -> {
contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(Class.forName(autoConfigurationClassName)))
.withPropertyValues("acme.note.enabled", "true")
.withUserConfiguration(Class.forName(configurationClassName.trim()));
});
When("/^The user retrieves the service of interface class (.*)$/", (String interfaceClassName) -> {
contextRunner.run((ctx) -> {
this.interfaceClass = Class.forName(interfaceClassName.trim());
assertThat(this.interfaceClass.isInterface()).isTrue();
assertThat(ctx).hasSingleBean(this.interfaceClass);
this.implementationClass = ctx.getBean(interfaceClass).getClass();
});
});
Then("/^The service class should match (.*)$/", (String serviceClassName) -> {
assertThat(Class.forName(serviceClassName.trim())).isEqualTo(this.implementationClass);
});
}
}
@@ -0,0 +1,90 @@
/**
* 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.
*/
package com.acme.fineract.portfolio.note.starter;
import static org.mockito.Mockito.mock;
import org.apache.fineract.infrastructure.core.config.FineractProperties;
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
import org.apache.fineract.infrastructure.core.service.RoutingDataSourceServiceFactory;
import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper;
import org.apache.fineract.portfolio.group.domain.GroupRepository;
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
import org.apache.fineract.portfolio.note.domain.NoteRepository;
import org.apache.fineract.portfolio.note.serialization.NoteCommandFromApiJsonDeserializer;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.jdbc.core.JdbcTemplate;
@EnableConfigurationProperties({ FineractProperties.class })
public class TestDefaultConfiguration {
// NOTE: unfortunately an abastract base class that contains all these mock functions won't work
@Bean
public FromJsonHelper fromJsonHelper() {
return mock(FromJsonHelper.class);
}
@Bean
public RoutingDataSourceServiceFactory routingDataSourceServiceFactory() {
return mock(RoutingDataSourceServiceFactory.class);
}
@Bean
public RoutingDataSource routingDataSource() {
return mock(RoutingDataSource.class);
}
@Bean
public JdbcTemplate jdbcTemplate() {
return mock(JdbcTemplate.class);
}
@Bean
public NoteRepository noteRepository() {
return mock(NoteRepository.class);
}
@Bean
public ClientRepositoryWrapper clientRepository() {
return mock(ClientRepositoryWrapper.class);
}
@Bean
public GroupRepository groupRepository() {
return mock(GroupRepository.class);
}
@Bean
public LoanRepositoryWrapper loanRepository() {
return mock(LoanRepositoryWrapper.class);
}
@Bean
public LoanTransactionRepository loanTransactionRepository() {
return mock(LoanTransactionRepository.class);
}
@Bean
public NoteCommandFromApiJsonDeserializer fromApiJsonDeserializer(FromJsonHelper fromJsonHelper) {
return new NoteCommandFromApiJsonDeserializer(fromJsonHelper);
}
}
@@ -0,0 +1,89 @@
/**
* 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.
*/
package com.acme.fineract.portfolio.note.starter;
import static org.mockito.Mockito.mock;
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
import org.apache.fineract.infrastructure.core.service.RoutingDataSourceServiceFactory;
import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper;
import org.apache.fineract.portfolio.group.domain.GroupRepository;
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepositoryWrapper;
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepository;
import org.apache.fineract.portfolio.note.domain.NoteRepository;
import org.apache.fineract.portfolio.note.serialization.NoteCommandFromApiJsonDeserializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.jdbc.core.JdbcTemplate;
@ComponentScan("com.acme.fineract")
public class TestOverrideConfiguration {
// NOTE: unfortunately an abastract base class that contains all these mock functions won't work
@Bean
public FromJsonHelper fromJsonHelper() {
return mock(FromJsonHelper.class);
}
@Bean
public RoutingDataSourceServiceFactory routingDataSourceServiceFactory() {
return mock(RoutingDataSourceServiceFactory.class);
}
@Bean
public RoutingDataSource routingDataSource() {
return mock(RoutingDataSource.class);
}
@Bean
public JdbcTemplate jdbcTemplate() {
return mock(JdbcTemplate.class);
}
@Bean
public NoteRepository noteRepository() {
return mock(NoteRepository.class);
}
@Bean
public ClientRepositoryWrapper clientRepository() {
return mock(ClientRepositoryWrapper.class);
}
@Bean
public GroupRepository groupRepository() {
return mock(GroupRepository.class);
}
@Bean
public LoanRepositoryWrapper loanRepository() {
return mock(LoanRepositoryWrapper.class);
}
@Bean
public LoanTransactionRepository loanTransactionRepository() {
return mock(LoanTransactionRepository.class);
}
@Bean
public NoteCommandFromApiJsonDeserializer fromApiJsonDeserializer(FromJsonHelper fromJsonHelper) {
return new NoteCommandFromApiJsonDeserializer(fromJsonHelper);
}
}
@@ -0,0 +1,33 @@
/**
* 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.
*/
package com.acme.fineract.portfolio.note.starter;
import io.cucumber.spring.CucumberContextConfiguration;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.web.WebAppConfiguration;
@CucumberContextConfiguration
@ExtendWith(SpringExtension.class)
@TestPropertySource("classpath:application-test.properties")
@WebAppConfiguration
public class TestSuite {
}
@@ -0,0 +1,20 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# test properties
@@ -0,0 +1,21 @@
#
# 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.
#
cucumber.publish.quiet=true
cucumber.glue=com.acme.fineract
@@ -0,0 +1,33 @@
#
# 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.
#
Feature: Note Feature
@modules
Scenario Outline: Verify that the dummy service returns the correct message
Given An auto configuration <autoConfigurationClass> and a service configuration <configurationClass>
When The user retrieves the service of interface class <interfaceClass>
Then The service class should match <serviceClass>
Examples:
| autoConfigurationClass | configurationClass | interfaceClass | serviceClass |
| org.apache.fineract.portfolio.note.starter.NoteAutoConfiguration | com.acme.fineract.portfolio.note.starter.TestDefaultConfiguration | org.apache.fineract.portfolio.note.service.NoteReadPlatformService | org.apache.fineract.portfolio.note.service.NoteReadPlatformServiceImpl |
| org.apache.fineract.portfolio.note.starter.NoteAutoConfiguration | com.acme.fineract.portfolio.note.starter.TestDefaultConfiguration | org.apache.fineract.portfolio.note.service.NoteWritePlatformService | org.apache.fineract.portfolio.note.service.NoteWritePlatformServiceJpaRepositoryImpl |
| org.apache.fineract.portfolio.note.starter.NoteAutoConfiguration | com.acme.fineract.portfolio.note.starter.TestOverrideConfiguration | org.apache.fineract.portfolio.note.service.NoteReadPlatformService | com.acme.fineract.portfolio.note.service.AcmeNoteReadPlatformService |
| org.apache.fineract.portfolio.note.starter.NoteAutoConfiguration | com.acme.fineract.portfolio.note.starter.TestOverrideConfiguration | org.apache.fineract.portfolio.note.service.NoteWritePlatformService | com.acme.fineract.portfolio.note.service.AcmeNoteWritePlatformService |
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
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.
-->
<configuration scan="false">
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>false</resetJUL>
</contextListener>
<appender name="STDOUT" target="System.out" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>true</withJansi>
<encoder>
<pattern>%green(%d{yyyy-MM-dd HH:mm:ss.SSS}) [%thread] %highlight(%-5level) %cyan(%logger{36}) - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.springframework.transaction" level="INFO" />
<logger name="org.springframework.data.convert" level="ERROR" />
<logger name="org.springframework.http.converter.json" level="ERROR" />
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>
+108
View File
@@ -0,0 +1,108 @@
/**
* 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.
*/
description = 'Fineract Custom Docker Image'
apply plugin: 'java'
apply plugin: 'com.google.cloud.tools.jib'
apply from: "${rootDir}/buildSrc/src/main/groovy/org.apache.fineract.dependencies.gradle"
jib {
from {
image = 'azul/zulu-openjdk-alpine:17'
}
to {
image = 'fineract-custom'
tags = [
"${project.version}",
'latest'
]
}
container {
creationTime = 'USE_CURRENT_TIMESTAMP'
mainClass = 'org.apache.fineract.ServerApplication'
jvmFlags = [
'-Xms1G',
'-XshowSettings:vm',
'-XX:+UseContainerSupport',
'-XX:+UseStringDeduplication',
'-XX:MinRAMPercentage=25',
'-XX:MaxRAMPercentage=80',
'--add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED',
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.lang.invoke=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.security=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED',
'--add-opens=java.management/javax.management=ALL-UNNAMED',
'--add-opens=java.naming/javax.naming=ALL-UNNAMED'
]
args = [
'-Duser.home=/tmp',
'-Dfile.encoding=UTF-8',
'-Duser.timezone=UTC',
'-Djava.security.egd=file:/dev/./urandom'
]
ports = ['8080/tcp', '8443/tcp']
labels = [maintainer: 'Aleksandar Vidakovic <aleks@apache.org>']
user = 'nobody:nogroup'
}
allowInsecureRegistries = true
dependencies {
implementation project(':fineract-provider')
// NOTE: dynamically load all custom modules
file("${rootDir}/custom").eachDir { companyDir ->
if('build' != companyDir.name && 'docker' != companyDir.name) {
file("${rootDir}/custom/${companyDir.name}").eachDir { categoryDir ->
if('build' != categoryDir.name) {
file("${rootDir}/custom/${companyDir.name}/${categoryDir.name}").eachDir { moduleDir ->
if('build' != moduleDir.name) {
implementation project(":custom:${companyDir.name}:${categoryDir.name}:${moduleDir.name}")
}
}
}
}
}
}
// NOTE: other custom dependencies
implementation 'org.mariadb.jdbc:mariadb-java-client'
implementation 'mysql:mysql-connector-java:8.0.31'
implementation 'org.postgresql:postgresql'
annotationProcessor('org.springframework.boot:spring-boot-autoconfigure-processor')
annotationProcessor('org.springframework.boot:spring-boot-configuration-processor')
}
pluginExtensions {
pluginExtension {
implementation = 'com.google.cloud.tools.jib.gradle.extension.layerfilter.JibLayerFilterExtension'
configuration {
filters {
filter {
glob = '/app/resources/**'
}
}
}
}
}
}
// tasks.jibDockerBuild.dependsOn(':fineract-provider:bootJar')
+87
View File
@@ -0,0 +1,87 @@
# 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.
#
# You can replace and test a more recent version of docker compose
version: '3.7'
services:
# Backend service
fineractmysql:
image: mariadb:10.10
volumes:
- ../../fineract-db/server_collation.cnf:/etc/mysql/conf.d/server_collation.cnf
- ../../fineract-db/docker:/docker-entrypoint-initdb.d:Z,ro
restart: always
environment:
MYSQL_ROOT_PASSWORD: skdcnwauicn2ucnaecasdsajdnizucawencascdca
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost", "--password=skdcnwauicn2ucnaecasdsajdnizucawencascdca" ]
timeout: 10s
retries: 10
ports:
- "3306:3306"
fineract-server:
image: fineract-custom:latest
volumes:
- ../../fineract-provider/build/data:/data
healthcheck:
test: ["CMD", 'sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";' ]
timeout: 10s
retries: 10
ports:
- 8443:8443
depends_on:
fineractmysql:
condition: service_healthy
environment:
# NOTE: node aware scheduler
- FINERACT_NODE_ID=1
# NOTE: env vars prefixed "FINERACT_HIKARI_*" are used to configure the database connection pool
- FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME=org.mariadb.jdbc.Driver
- FINERACT_HIKARI_JDBC_URL=jdbc:mariadb://fineractmysql:3306/fineract_tenants
- FINERACT_HIKARI_USERNAME=root
- FINERACT_HIKARI_PASSWORD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
# ... following variables are optional; "application.properties" contains reasonable defaults (same as here)
- FINERACT_HIKARI_MINIMUM_IDLE=3
- FINERACT_HIKARI_MAXIMUM_POOL_SIZE=10
- FINERACT_HIKARI_IDLE_TIMEOUT=60000
- FINERACT_HIKARI_CONNECTION_TIMEOUT=20000
- FINERACT_HIKARI_TEST_QUERY=SELECT 1
- FINERACT_HIKARI_AUTO_COMMIT=true
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_PREP_STMTS=true
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SIZE=250
- FINERACT_HIKARI_DS_PROPERTIES_PREP_STMT_CACHE_SQL_LIMIT=2048
- FINERACT_HIKARI_DS_PROPERTIES_USE_SERVER_PREP_STMTS=true
- FINERACT_HIKARI_DS_PROPERTIES_USE_LOCAL_SESSION_STATE=true
- FINERACT_HIKARI_DS_PROPERTIES_REWRITE_BATCHED_STATEMENTS=true
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_RESULT_SET_METADATA=true
- FINERACT_HIKARI_DS_PROPERTIES_CACHE_SERVER_CONFIGURATION=true
- FINERACT_HIKARI_DS_PROPERTIES_ELIDE_SET_AUTO_COMMITS=true
- FINERACT_HIKARI_DS_PROPERTIES_MAINTAIN_TIME_STATS=false
- FINERACT_HIKARI_DS_PROPERTIES_LOG_SLOW_QUERIES=true
- FINERACT_HIKARI_DS_PROPERTIES_DUMP_QUERIES_IN_EXCEPTION=true
# NOTE: env vars prefixed "FINERACT_DEFAULT_TENANTDB_*" are used to create the default tenant database
- FINERACT_DEFAULT_TENANTDB_HOSTNAME=fineractmysql
- FINERACT_DEFAULT_TENANTDB_PORT=3306
- FINERACT_DEFAULT_TENANTDB_UID=root
- FINERACT_DEFAULT_TENANTDB_PWD=skdcnwauicn2ucnaecasdsajdnizucawencascdca
- FINERACT_DEFAULT_TENANTDB_CONN_PARAMS=
- FINERACT_DEFAULT_TENANTDB_TIMEZONE=Asia/Kolkata
- FINERACT_DEFAULT_TENANTDB_IDENTIFIER=default
- FINERACT_DEFAULT_TENANTDB_NAME=fineract_default
- FINERACT_DEFAULT_TENANTDB_DESCRIPTION=Default Demo Tenant
- JAVA_TOOL_OPTIONS="-Xmx1G"
+3 -3
View File
@@ -16,13 +16,12 @@
# under the License.
#
# NB: Travis CI (dist: bionic) supports up to v3.7
# (unless we'd install a more recent version in .travis.yml)
# You can replace and test a more recent version of docker compose
version: '3.7'
services:
# Backend service
fineractpostgresql:
image: postgres:14.2
image: postgres:14.6
volumes:
- ./fineract-db/docker/postgresql:/docker-entrypoint-initdb.d/:Z,ro
restart: always
@@ -94,3 +93,4 @@ services:
- FINERACT_DEFAULT_TENANTDB_IDENTIFIER=default
- FINERACT_DEFAULT_TENANTDB_NAME=fineract_default
- FINERACT_DEFAULT_TENANTDB_DESCRIPTION=Default Demo Tenant
- JAVA_TOOL_OPTIONS="-Xmx1G"
+3 -3
View File
@@ -16,13 +16,12 @@
# under the License.
#
# NB: Travis CI (dist: bionic) supports up to v3.7
# (unless we'd install a more recent version in .travis.yml)
# You can replace and test a more recent version of docker compose
version: '3.7'
services:
# Backend service
fineractmysql:
image: mariadb:10.8
image: mariadb:10.10
volumes:
- ./fineract-db/server_collation.cnf:/etc/mysql/conf.d/server_collation.cnf
- ./fineract-db/docker:/docker-entrypoint-initdb.d:Z,ro
@@ -90,3 +89,4 @@ services:
- FINERACT_DEFAULT_TENANTDB_IDENTIFIER=default
- FINERACT_DEFAULT_TENANTDB_NAME=fineract_default
- FINERACT_DEFAULT_TENANTDB_DESCRIPTION=Default Demo Tenant
- JAVA_TOOL_OPTIONS="-Xmx1G"
+80
View File
@@ -0,0 +1,80 @@
/**
* 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 com.github.davidmc24.gradle.plugin.avro.GenerateAvroJavaTask
// TODO: @vidakovic we should publish this lib to Maven Central; do in separate PR
description = 'Fineract Avro Schemas'
apply plugin: 'com.github.davidmc24.gradle.plugin.avro-base'
apply from: 'dependencies.gradle'
task preprocessAvroSchemas() {
doLast {
copy {
from "$projectDir/src/main/avro"
into "$buildDir/generated/avro/src/main/avro"
filter { line ->
line.replaceAll("\"bigdecimal\"", new File("$projectDir/src/main/resources/avro-templates/bigdecimal.avsc").getText("UTF-8"))
}
}
}
}
task buildJavaSdk(type: GenerateAvroJavaTask) {
source("$buildDir/generated/avro/src/main/avro")
outputDir = file("$buildDir/generated/java/src/main/java")
templateDirectory = "$projectDir/src/main/resources/avro-generator-templates/"
}
spotless {
json {
target '**/*.avsc' // TODO: include generated AVSCs as well
targetExclude ''
simple()
}
}
buildJavaSdk.dependsOn(preprocessAvroSchemas, spotlessJsonApply)
compileJava.dependsOn(buildJavaSdk, licenseFormatMain)
java {
// keep this at Java 8, not 17
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType(JavaCompile) {
options.compilerArgs -= ["-Werror"]
}
configurations {
generatedCompileClasspath.extendsFrom implementation
generatedRuntimeClasspath.extendsFrom runtimeClasspath
}
test {
useJUnitPlatform()
}
sourceSets.main.java.srcDir new File(buildDir, "generated/java/src/main/java")
licenseFormatMain.dependsOn buildJavaSdk
licenseMain.dependsOn licenseFormatMain

Some files were not shown because too many files have changed in this diff Show More