This is an automated email from the ASF dual-hosted git repository.
arnold pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 240039f97 - [x] Create fineract-core module - used to common cross
module classes and interfaces - [x] Create fineract-investor module for build -
[x] modify tenant liquibase loader to using module based liquibase processing -
[x] sample liquibase into the fineract-investor module - [x] Move
NewCommandSourceHandler and dependencies to the fineract-core
240039f97 is described below
commit 240039f9790dbb37c48873d89b2a3d5f0a2da73e
Author: Janos Haber <[email protected]>
AuthorDate: Mon May 15 12:43:07 2023 +0200
- [x] Create fineract-core module - used to common cross module classes and
interfaces
- [x] Create fineract-investor module for build
- [x] modify tenant liquibase loader to using module based liquibase
processing
- [x] sample liquibase into the fineract-investor module
- [x] Move NewCommandSourceHandler and dependencies to the fineract-core
---
build.gradle | 9 ++-
.../acme/event/externalevent/dependencies.gradle | 1 +
custom/acme/event/starter/dependencies.gradle | 1 +
custom/acme/loan/cob/dependencies.gradle | 1 +
custom/acme/loan/job/dependencies.gradle | 1 +
custom/acme/loan/processor/dependencies.gradle | 1 +
custom/acme/loan/starter/dependencies.gradle | 1 +
custom/acme/note/service/dependencies.gradle | 1 +
custom/acme/note/starter/dependencies.gradle | 1 +
fineract-core/build.gradle | 72 +++++++++++++++++
.../dependencies.gradle | 87 ++-------------------
.../fineract/commands/annotation/CommandType.java | 0
.../commands/handler/NewCommandSourceHandler.java | 0
.../infrastructure/core/api/JsonCommand.java | 0
.../core/data/ApiErrorMessageArg.java | 0
.../core/data/ApiParameterError.java | 0
.../core/data/CommandProcessingResult.java | 0
.../core/data/DataValidatorBuilder.java | 0
.../infrastructure/core/domain/ExternalId.java | 0
.../core/exception/AbstractPlatformException.java | 0
.../core/exception/InvalidJsonException.java | 0
.../PlatformApiDataValidationException.java | 0
.../exception/PlatformInternalServerException.java | 0
.../exception/UnsupportedParameterException.java | 0
.../core/serialization/FromJsonHelper.java | 0
.../core/serialization/JsonParserHelper.java | 0
.../domain/BasicPasswordEncodablePlatformUser.java | 0
.../security/domain/PlatformUser.java | 0
.../security/service/PlatformPasswordEncoder.java | 0
fineract-core/src/test/java/.gitkeep | 0
fineract-core/src/test/resources/.gitkeep | 0
fineract-investor/build.gradle | 89 ++++++++++++++++++++++
fineract-investor/dependencies.gradle | 46 +++++++++++
.../module/investor/module-changelog-master.xml | 26 +++++++
.../module/investor/parts/0001_initial_schema.xml | 14 +---
fineract-investor/src/test/java/.gitkeep | 0
fineract-investor/src/test/resources/.gitkeep | 0
fineract-provider/build.gradle | 1 +
fineract-provider/dependencies.gradle | 2 +
.../service/migration/TenantModuleRootFilter.java} | 12 +--
.../resources/db/changelog/db.changelog-master.xml | 1 +
fineract-war/build.gradle | 2 +
integration-tests/dependencies.gradle | 2 +
settings.gradle | 2 +
44 files changed, 277 insertions(+), 96 deletions(-)
diff --git a/build.gradle b/build.gradle
index 24bfd31c8..856217886 100644
--- a/build.gradle
+++ b/build.gradle
@@ -27,7 +27,9 @@ buildscript {
fineractJavaProjects = subprojects.findAll{
[
'fineract-api',
+ 'fineract-core',
'fineract-provider',
+ 'fineract-investor',
'integration-tests',
'twofactor-tests',
'oauth2-tests',
@@ -39,7 +41,8 @@ buildscript {
[
'fineract-avro-schemas',
'fineract-client',
- 'fineract-provider'
+ 'fineract-provider',
+ 'fineract-investor'
].contains(it.name)
}
npmRepository = 'https://npm.pkg.github.com'
@@ -301,7 +304,9 @@ configure(project.fineractJavaProjects) {
implementation.setCanBeResolved(true)
api.setCanBeResolved(true)
}
-
+ tasks.withType(Copy) {
+ duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+ }
tasks.withType(JavaCompile) {
options.compilerArgs += [
"-Xlint:unchecked",
diff --git a/custom/acme/event/externalevent/dependencies.gradle
b/custom/acme/event/externalevent/dependencies.gradle
index 364f7d772..b020fa967 100644
--- a/custom/acme/event/externalevent/dependencies.gradle
+++ b/custom/acme/event/externalevent/dependencies.gradle
@@ -18,6 +18,7 @@
*/
dependencies {
+ implementation(project(':fineract-core'))
implementation(project(':fineract-provider'))
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
}
diff --git a/custom/acme/event/starter/dependencies.gradle
b/custom/acme/event/starter/dependencies.gradle
index 30b090b9f..d377d574a 100644
--- a/custom/acme/event/starter/dependencies.gradle
+++ b/custom/acme/event/starter/dependencies.gradle
@@ -18,6 +18,7 @@
*/
dependencies {
+ implementation(project(':fineract-core'))
implementation(project(':fineract-provider'))
implementation('org.springframework.boot:spring-boot-starter')
}
diff --git a/custom/acme/loan/cob/dependencies.gradle
b/custom/acme/loan/cob/dependencies.gradle
index 364f7d772..b020fa967 100644
--- a/custom/acme/loan/cob/dependencies.gradle
+++ b/custom/acme/loan/cob/dependencies.gradle
@@ -18,6 +18,7 @@
*/
dependencies {
+ implementation(project(':fineract-core'))
implementation(project(':fineract-provider'))
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
}
diff --git a/custom/acme/loan/job/dependencies.gradle
b/custom/acme/loan/job/dependencies.gradle
index fd2f26643..b77475517 100644
--- a/custom/acme/loan/job/dependencies.gradle
+++ b/custom/acme/loan/job/dependencies.gradle
@@ -18,6 +18,7 @@
*/
dependencies {
+ implementation(project(':fineract-core'))
implementation(project(':fineract-provider'))
implementation('org.springframework.batch:spring-batch-integration')
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
diff --git a/custom/acme/loan/processor/dependencies.gradle
b/custom/acme/loan/processor/dependencies.gradle
index 59d668289..edd2e139b 100644
--- a/custom/acme/loan/processor/dependencies.gradle
+++ b/custom/acme/loan/processor/dependencies.gradle
@@ -18,5 +18,6 @@
*/
dependencies {
+ implementation(project(':fineract-core'))
implementation(project(':fineract-provider'))
}
diff --git a/custom/acme/loan/starter/dependencies.gradle
b/custom/acme/loan/starter/dependencies.gradle
index 11225f482..1f134d647 100644
--- a/custom/acme/loan/starter/dependencies.gradle
+++ b/custom/acme/loan/starter/dependencies.gradle
@@ -18,6 +18,7 @@
*/
dependencies {
+ implementation(project(':fineract-core'))
implementation(project(':fineract-provider'))
implementation(project(':custom:acme:loan:cob'))
implementation(project(':custom:acme:loan:processor'))
diff --git a/custom/acme/note/service/dependencies.gradle
b/custom/acme/note/service/dependencies.gradle
index a81ef21a1..9bea53177 100644
--- a/custom/acme/note/service/dependencies.gradle
+++ b/custom/acme/note/service/dependencies.gradle
@@ -18,6 +18,7 @@
*/
dependencies {
+ implementation(project(':fineract-core'))
implementation(project(':fineract-provider'))
compileOnly('org.springframework.boot:spring-boot-autoconfigure')
}
diff --git a/custom/acme/note/starter/dependencies.gradle
b/custom/acme/note/starter/dependencies.gradle
index 3fd62233d..7cf50805b 100644
--- a/custom/acme/note/starter/dependencies.gradle
+++ b/custom/acme/note/starter/dependencies.gradle
@@ -20,6 +20,7 @@
dependencies {
implementation(project(':custom:acme:note:service'))
implementation('org.springframework.boot:spring-boot-starter')
+ testImplementation(project(':fineract-core'))
testImplementation(project(':fineract-provider'))
testImplementation('org.springframework.boot:spring-boot-starter-jdbc')
testImplementation('org.springframework.boot:spring-boot-starter-data-jpa')
diff --git a/fineract-core/build.gradle b/fineract-core/build.gradle
new file mode 100644
index 000000000..f725dc284
--- /dev/null
+++ b/fineract-core/build.gradle
@@ -0,0 +1,72 @@
+/**
+ * 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 Core'
+
+apply plugin: 'java'
+apply plugin: 'eclipse'
+check.dependsOn('cucumber')
+
+configurations {
+ providedRuntime // needed for Spring Boot executable WAR
+ providedCompile
+ compile() {
+ exclude module: 'hibernate-entitymanager'
+ exclude module: 'hibernate-validator'
+ exclude module: 'activation'
+ exclude module: 'bcmail-jdk14'
+ exclude module: 'bcprov-jdk14'
+ exclude module: 'bctsp-jdk14'
+ exclude module: 'c3p0'
+ exclude module: 'stax-api'
+ exclude module: 'jaxb-api'
+ exclude module: 'jaxb-impl'
+ exclude module: 'jboss-logging'
+ exclude module: 'itext-rtf'
+ exclude module: 'classworlds'
+ }
+ runtime
+}
+
+apply from: 'dependencies.gradle'
+
+// Configuration for the modernizer plugin
+// https://github.com/andygoossens/gradle-modernizer-plugin
+modernizer {
+ ignoreClassNamePatterns = [
+ '.*AbstractPersistableCustom',
+ '.*EntityTables',
+ '.*domain.*'
+ ]
+}
+
+// If we are running Gradle within Eclipse to enhance classes with OpenJPA,
+// set the classes directory to point to Eclipse's default build directory
+if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') {
+ sourceSets.main.java.outputDir = new File(rootProject.projectDir,
"fineract-core/bin/main")
+}
+
+if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
+ sourceSets {
+ test {
+ java {
+ exclude '**/core/boot/tests/**'
+ }
+ }
+ }
+}
diff --git a/fineract-provider/dependencies.gradle
b/fineract-core/dependencies.gradle
similarity index 64%
copy from fineract-provider/dependencies.gradle
copy to fineract-core/dependencies.gradle
index 352e51d4c..1c41c9971 100644
--- a/fineract-provider/dependencies.gradle
+++ b/fineract-core/dependencies.gradle
@@ -18,7 +18,6 @@
*/
dependencies {
- providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
// Never use "compile" scope, but make all dependencies either
'implementation', 'runtimeOnly' or 'testCompile'.
// Note that we never use 'api', because Fineract at least currently is a
simple monolithic application ("WAR"), not a library.
@@ -26,75 +25,31 @@ dependencies {
// implementation dependencies are directly used (compiled against) in
src/main (and src/test)
//
- implementation(
- project(path: ':fineract-avro-schemas')
- )
implementation(
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-security',
- 'org.springframework.boot:spring-boot-starter-cache',
-
'org.springframework.boot:spring-boot-starter-oauth2-resource-server',
- 'org.springframework.boot:spring-boot-starter-actuator',
- 'org.springframework.boot:spring-boot-starter-batch',
- 'org.springframework.batch:spring-batch-integration',
- 'org.springframework.boot:spring-boot-starter-integration',
- 'org.springframework.integration:spring-integration-event',
- 'org.springframework.integration:spring-integration-jms',
-
- 'org.apache.avro:avro',
'jakarta.ws.rs:jakarta.ws.rs-api',
'org.glassfish.jersey.media:jersey-media-multipart',
- 'org.springframework:spring-jms',
- 'org.springframework:spring-context-support',
-
'com.google.guava:guava',
'com.google.code.gson:gson',
- 'jakarta.jms:jakarta.jms-api',
- 'jakarta.management.j2ee:jakarta.management.j2ee-api',
-
- 'com.squareup.retrofit2:retrofit',
- 'com.squareup.okhttp3:okhttp',
- 'com.squareup.okhttp3:okhttp-urlconnection',
-
'org.apache.commons:commons-lang3',
- 'commons-io:commons-io',
- 'org.apache.poi:poi',
- 'org.apache.poi:poi-ooxml',
- 'org.apache.tika:tika-core',
- 'org.apache.tika:tika-parser-microsoft-module',
- 'org.apache.tika:tika-parser-miscoffice-module',
-
'org.liquibase:liquibase-core',
- 'com.github.librepdf:openpdf',
- 'com.github.spullara.mustache.java:compiler',
'com.jayway.jsonpath:json-path',
- 'javax.cache:cache-api',
-
'com.github.spotbugs:spotbugs-annotations',
'io.swagger.core.v3:swagger-annotations',
- 'com.google.cloud.sql:mysql-socket-factory-connector-j-8',
'com.squareup.retrofit2:converter-gson',
- 'com.sun.activation:jakarta.activation',
- 'com.sun.mail:jakarta.mail',
- 'org.springdoc:springdoc-openapi-ui',
- 'org.springdoc:springdoc-openapi-common',
'org.springdoc:springdoc-openapi-security',
'org.mapstruct:mapstruct',
'io.github.resilience4j:resilience4j-spring-boot2',
)
- implementation ('org.apache.commons:commons-email') {
- exclude group: 'com.sun.mail', module: 'javax.mail'
- exclude group: 'javax.activation', module: 'activation'
- }
-
implementation('org.springframework.boot:spring-boot-starter-jersey') {
exclude group: 'org.glassfish.hk2.external', module:
'aopalliance-repackaged'
exclude group: 'org.glassfish.hk2', module: 'hk2-runlevel'
@@ -107,45 +62,12 @@ dependencies {
implementation ('jakarta.xml.bind:jakarta.xml.bind-api') {
exclude group: 'jakarta.activation'
}
- implementation ('org.apache.activemq:activemq-broker') {
- exclude group: 'org.apache.geronimo.specs'
- exclude group: 'javax.annotation', module: 'javax.annotation-api'
- }
implementation ('org.springframework.boot:spring-boot-starter-data-jpa') {
exclude group: 'org.hibernate'
}
implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') {
exclude group: 'org.eclipse.persistence', module: 'jakarta.persistence'
}
- implementation ('org.quartz-scheduler:quartz') {
- exclude group: 'com.zaxxer', module: 'HikariCP-java7'
- }
- implementation('org.apache.commons:commons-csv'){}
- implementation ('software.amazon.awssdk:s3') {
- }
- implementation ('software.amazon.awssdk:auth') {
- }
-
- implementation ('org.mnode.ical4j:ical4j') {
- exclude group: 'commons-logging'
- exclude group: 'javax.activation'
- exclude group: 'com.sun.mail', module: 'javax.mail'
- }
-
- implementation ('org.ehcache:ehcache') {
- exclude group: 'com.sun.activation'
- }
-
- implementation('org.owasp.esapi:esapi') {
- exclude group: 'org.slf4j'
- exclude group: 'log4j'
- exclude group: 'commons-logging'
- exclude group: 'commons-collections'
- exclude group: 'commons-lang'
- exclude group: 'spotbugs-annotations'
- exclude group: 'xml-apis'
- }
-
runtimeOnly('org.glassfish.jaxb:jaxb-runtime') {
exclude group: 'com.sun.activation'
}
@@ -170,7 +92,6 @@ dependencies {
implementation 'org.apache.commons:commons-math3'
implementation 'io.github.classgraph:classgraph'
-
// testCompile dependencies are ONLY used in src/test, not src/main.
// Do NOT repeat dependencies which are ALREADY in implementation or
runtimeOnly!
//
@@ -184,5 +105,13 @@ dependencies {
exclude group: 'javax.activation'
exclude group: 'org.skyscreamer'
}
+ implementation ('org.mnode.ical4j:ical4j') {
+ exclude group: 'commons-logging'
+ exclude group: 'javax.activation'
+ exclude group: 'com.sun.mail', module: 'javax.mail'
+ }
+ implementation ('org.quartz-scheduler:quartz') {
+ exclude group: 'com.zaxxer', module: 'HikariCP-java7'
+ }
testImplementation ('org.mockito:mockito-inline')
}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/commands/annotation/CommandType.java
b/fineract-core/src/main/java/org/apache/fineract/commands/annotation/CommandType.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/commands/annotation/CommandType.java
rename to
fineract-core/src/main/java/org/apache/fineract/commands/annotation/CommandType.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java
b/fineract-core/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java
similarity index 100%
copy from
fineract-provider/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java
copy to
fineract-core/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiErrorMessageArg.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiErrorMessageArg.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiErrorMessageArg.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiErrorMessageArg.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalId.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalId.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalId.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalId.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformException.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformException.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformException.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformException.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformApiDataValidationException.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformApiDataValidationException.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformApiDataValidationException.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformApiDataValidationException.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformInternalServerException.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformInternalServerException.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformInternalServerException.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformInternalServerException.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/domain/BasicPasswordEncodablePlatformUser.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/BasicPasswordEncodablePlatformUser.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/domain/BasicPasswordEncodablePlatformUser.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/BasicPasswordEncodablePlatformUser.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/domain/PlatformUser.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/PlatformUser.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/domain/PlatformUser.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/PlatformUser.java
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformPasswordEncoder.java
b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformPasswordEncoder.java
similarity index 100%
rename from
fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformPasswordEncoder.java
rename to
fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformPasswordEncoder.java
diff --git a/fineract-core/src/test/java/.gitkeep
b/fineract-core/src/test/java/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/fineract-core/src/test/resources/.gitkeep
b/fineract-core/src/test/resources/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/fineract-investor/build.gradle b/fineract-investor/build.gradle
new file mode 100644
index 000000000..3d5d695d5
--- /dev/null
+++ b/fineract-investor/build.gradle
@@ -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.
+ */
+description = 'Fineract Investor'
+
+apply plugin: 'java'
+apply plugin: 'eclipse'
+
+check.dependsOn('cucumber')
+
+// Configuration for Swagger documentation generation task
+//
https://github.com/swagger-api/swagger-core/tree/master/modules/swagger-gradle-plugin
+import org.apache.tools.ant.filters.ReplaceTokens
+
+
+
+configurations {
+ providedRuntime // needed for Spring Boot executable WAR
+ providedCompile
+ compile() {
+ exclude module: 'hibernate-entitymanager'
+ exclude module: 'hibernate-validator'
+ exclude module: 'activation'
+ exclude module: 'bcmail-jdk14'
+ exclude module: 'bcprov-jdk14'
+ exclude module: 'bctsp-jdk14'
+ exclude module: 'c3p0'
+ exclude module: 'stax-api'
+ exclude module: 'jaxb-api'
+ exclude module: 'jaxb-impl'
+ exclude module: 'jboss-logging'
+ exclude module: 'itext-rtf'
+ exclude module: 'classworlds'
+ }
+ runtime
+}
+
+apply from: 'dependencies.gradle'
+
+// Configuration for the modernizer plugin
+// https://github.com/andygoossens/gradle-modernizer-plugin
+modernizer {
+ ignoreClassNamePatterns = [
+ '.*AbstractPersistableCustom',
+ '.*EntityTables',
+ '.*domain.*'
+ ]
+}
+
+// If we are running Gradle within Eclipse to enhance classes with OpenJPA,
+// set the classes directory to point to Eclipse's default build directory
+if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') {
+ sourceSets.main.java.outputDir = new File(rootProject.projectDir,
"fineract-core/bin/main")
+}
+
+eclipse {
+ project {
+ buildCommand([ LaunchConfigHandle:
"<project>/.externalToolBuilders/OpenJPA Enhance Builder.launch" ],
'org.eclipse.ui.externaltools.ExternalToolBuilder')
+ }
+}
+
+/*
http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle
*/
+sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir
+sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir
+
+if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
+ sourceSets {
+ test {
+ java {
+ exclude '**/core/boot/tests/**'
+ }
+ }
+ }
+}
diff --git a/fineract-investor/dependencies.gradle
b/fineract-investor/dependencies.gradle
new file mode 100644
index 000000000..d6f93f2c3
--- /dev/null
+++ b/fineract-investor/dependencies.gradle
@@ -0,0 +1,46 @@
+/**
+ * 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 {
+ // Never use "compile" scope, but make all dependencies either
'implementation', 'runtimeOnly' or 'testCompile'.
+ // Note that we never use 'api', because Fineract at least currently is a
simple monolithic application ("WAR"), not a library.
+ // We also (normally should have) no need to ever use 'compileOnly'.
+
+ // implementation dependencies are directly used (compiled against) in
src/main (and src/test)
+ //
+ api(project(path: ':fineract-core'))
+ compileOnly 'org.projectlombok:lombok'
+ annotationProcessor 'org.projectlombok:lombok'
+ annotationProcessor 'org.mapstruct:mapstruct-processor'
+
+ // testCompile dependencies are ONLY used in src/test, not src/main.
+ // Do NOT repeat dependencies which are ALREADY in implementation or
runtimeOnly!
+ //
+ testImplementation( 'io.cucumber:cucumber-spring',
+ 'io.github.classgraph:classgraph',
+ )
+ 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-inline')
+}
diff --git
a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/module-changelog-master.xml
b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/module-changelog-master.xml
new file mode 100644
index 000000000..065386811
--- /dev/null
+++
b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/module-changelog-master.xml
@@ -0,0 +1,26 @@
+<?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">
+ <include relativeToChangelogFile="true" file="parts/0001_initial_schema.xml"
/>
+</databaseChangeLog>
diff --git
a/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml
b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0001_initial_schema.xml
similarity index 53%
copy from
fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml
copy to
fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0001_initial_schema.xml
index 6d7a0bd16..306eb1e3a 100644
--- a/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml
+++
b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0001_initial_schema.xml
@@ -22,14 +22,8 @@
<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">
- <property name="current_date" value="CURDATE()" context="mysql"/>
- <property name="current_date" value="CURRENT_DATE" context="postgresql"/>
- <property name="current_datetime" value="NOW()"/>
- <property name="uuid" value="uuid()" context="mysql"/>
- <property name="uuid" value="uuid_generate_v4()" context="postgresql"/>
- <include file="tenant-store/initial-switch-changelog-tenant-store.xml"
relativeToChangelogFile="true" context="tenant_store_db AND initial_switch"/>
- <include file="tenant-store/changelog-tenant-store.xml"
relativeToChangelogFile="true" context="tenant_store_db AND !initial_switch"/>
- <include file="tenant/initial-switch-changelog-tenant.xml"
relativeToChangelogFile="true" context="tenant_db AND initial_switch"/>
- <include file="tenant/changelog-tenant.xml" relativeToChangelogFile="true"
context="tenant_db AND !initial_switch"/>
- <includeAll path="db/custom-changelog" errorIfMissingOrEmpty="false"
context="tenant_db AND custom_changelog" />
+ <changeSet author="fineract" id="1">
+ <comment>Executed asset externalization</comment>
+ </changeSet>
+
</databaseChangeLog>
diff --git a/fineract-investor/src/test/java/.gitkeep
b/fineract-investor/src/test/java/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/fineract-investor/src/test/resources/.gitkeep
b/fineract-investor/src/test/resources/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index 924b44829..83dbb36eb 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -25,6 +25,7 @@ apply plugin: 'org.springframework.boot'
apply plugin: 'com.gorylenko.gradle-git-properties'
apply plugin: 'io.swagger.core.v3.swagger-gradle-plugin'
apply plugin: 'com.google.cloud.tools.jib'
+apply plugin: 'org.springframework.boot'
check.dependsOn('cucumber')
diff --git a/fineract-provider/dependencies.gradle
b/fineract-provider/dependencies.gradle
index 352e51d4c..d2cd3244a 100644
--- a/fineract-provider/dependencies.gradle
+++ b/fineract-provider/dependencies.gradle
@@ -18,6 +18,8 @@
*/
dependencies {
+ implementation(project(path: ':fineract-core'))
+ implementation(project(path: ':fineract-investor'))
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
// Never use "compile" scope, but make all dependencies either
'implementation', 'runtimeOnly' or 'testCompile'.
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantModuleRootFilter.java
similarity index 71%
rename from
fineract-provider/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java
rename to
fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantModuleRootFilter.java
index d2fd82ce1..9a71322c7 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantModuleRootFilter.java
@@ -16,12 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.fineract.commands.handler;
+package org.apache.fineract.infrastructure.core.service.migration;
-import org.apache.fineract.infrastructure.core.api.JsonCommand;
-import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
+import liquibase.changelog.IncludeAllFilter;
-public interface NewCommandSourceHandler {
+public class TenantModuleRootFilter implements IncludeAllFilter {
- CommandProcessingResult processCommand(JsonCommand command);
+ @Override
+ public boolean include(String changeLogPath) {
+ return changeLogPath.endsWith("module-changelog-master.xml");
+ }
}
diff --git
a/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml
b/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml
index 6d7a0bd16..4edca24bf 100644
--- a/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml
+++ b/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml
@@ -31,5 +31,6 @@
<include file="tenant-store/changelog-tenant-store.xml"
relativeToChangelogFile="true" context="tenant_store_db AND !initial_switch"/>
<include file="tenant/initial-switch-changelog-tenant.xml"
relativeToChangelogFile="true" context="tenant_db AND initial_switch"/>
<include file="tenant/changelog-tenant.xml" relativeToChangelogFile="true"
context="tenant_db AND !initial_switch"/>
+ <includeAll path="db/changelog/tenant/module"
errorIfMissingOrEmpty="false" context="tenant_db AND custom_changelog"
filter="org.apache.fineract.infrastructure.core.service.migration.TenantModuleRootFilter"
/>
<includeAll path="db/custom-changelog" errorIfMissingOrEmpty="false"
context="tenant_db AND custom_changelog" />
</databaseChangeLog>
diff --git a/fineract-war/build.gradle b/fineract-war/build.gradle
index 263947d71..82ec98556 100644
--- a/fineract-war/build.gradle
+++ b/fineract-war/build.gradle
@@ -48,6 +48,8 @@ war {
}
dependencies {
+ implementation project(':fineract-core')
+ implementation project(':fineract-investor')
implementation project(':fineract-provider')
}
diff --git a/integration-tests/dependencies.gradle
b/integration-tests/dependencies.gradle
index 1aa178779..64223fa74 100644
--- a/integration-tests/dependencies.gradle
+++ b/integration-tests/dependencies.gradle
@@ -22,6 +22,8 @@ dependencies {
//
tomcat 'org.apache.tomcat:tomcat:9.0.69@zip'
testImplementation(
files("$rootDir/fineract-provider/build/classes/java/main/"),
+ project(path: ':fineract-core', configuration: 'runtimeElements'),
+ project(path: ':fineract-investor', configuration:
'runtimeElements'),
project(path: ':fineract-provider', configuration:
'runtimeElements'),
project(path: ':fineract-avro-schemas', configuration:
'runtimeElements'),
project(path: ':fineract-client', configuration:
'runtimeElements'),
diff --git a/settings.gradle b/settings.gradle
index 6d87daf20..85f504611 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -17,7 +17,9 @@
* under the License.
*/
rootProject.name='fineract'
+include ':fineract-core'
include ':fineract-provider'
+include ':fineract-investor'
include ':fineract-war'
include ':integration-tests'
include ':twofactor-tests'