From 1ebfad230c49524b86d76aae98ea51fc6a6534b8 Mon Sep 17 00:00:00 2001 From: Arnold Galovics Date: Fri, 20 Jun 2025 13:47:48 +0200 Subject: [PATCH] Revert "FINERACT-2181: Some tweaks in the gradle build to ensure correct task processing" This reverts commit 11cecb0d45bef2e6f7fda3a7c3575be53732a078. --- build.gradle | 4 + custom/docker/build.gradle | 1 + fineract-accounting/build.gradle | 59 +-- .../main/resources/META-INF/persistence.xml | 51 +++ fineract-avro-schemas/build.gradle | 6 +- fineract-branch/build.gradle | 61 +-- .../main/resources/META-INF/persistence.xml | 77 ++++ .../module/branch/persistence.xml | 100 ----- fineract-charge/build.gradle | 61 +-- .../main/resources/META-INF}/persistence.xml | 70 ++-- .../module/charge/persistence.xml | 93 ----- fineract-command/build.gradle | 56 --- fineract-command/dependencies.gradle | 3 - .../persistence/CommandRepository.java | 2 +- .../persistence/mapping/CommandMapper.java | 2 +- .../{domain => model}/CommandEntity.java | 2 +- fineract-core/build.gradle | 65 +--- .../main/resources/META-INF}/persistence.xml | 10 +- fineract-document/build.gradle | 61 +-- .../main/resources/META-INF}/persistence.xml | 66 ++-- fineract-investor/build.gradle | 61 +-- .../main/resources/META-INF}/persistence.xml | 118 +++--- fineract-loan/build.gradle | 62 +-- .../main/resources/META-INF}/persistence.xml | 83 ++-- fineract-progressive-loan/build.gradle | 61 +-- .../persistence.xml | 127 +++--- fineract-provider/build.gradle | 186 +-------- .../main/resources/META-INF}/persistence.xml | 139 ++++--- .../module/provider/persistence.xml | 367 ------------------ fineract-rates/build.gradle | 61 +-- .../main/resources/META-INF/persistence.xml | 78 ++++ fineract-report/build.gradle | 61 +-- .../main/resources/META-INF}/persistence.xml | 67 ++-- fineract-savings/build.gradle | 77 +--- .../main/resources/META-INF}/persistence.xml | 70 ++-- .../module/savings/persistence.xml | 123 ------ fineract-tax/build.gradle | 61 +-- .../main/resources/META-INF}/persistence.xml | 67 ++-- 38 files changed, 810 insertions(+), 1909 deletions(-) create mode 100644 fineract-accounting/src/main/resources/META-INF/persistence.xml create mode 100644 fineract-branch/src/main/resources/META-INF/persistence.xml delete mode 100644 fineract-branch/src/main/resources/jpa/static-weaving/module/branch/persistence.xml rename {fineract-tax/src/main/resources/jpa/static-weaving/module/tax => fineract-charge/src/main/resources/META-INF}/persistence.xml (81%) delete mode 100644 fineract-charge/src/main/resources/jpa/static-weaving/module/charge/persistence.xml rename fineract-command/src/main/java/org/apache/fineract/command/persistence/{domain => model}/CommandEntity.java (97%) rename {fineract-command/src/main/resources/jpa/static-weaving/module/command => fineract-core/src/main/resources/META-INF}/persistence.xml (74%) rename {fineract-core/src/main/resources/jpa/static-weaving/module/core => fineract-document/src/main/resources/META-INF}/persistence.xml (75%) rename {fineract-loan/src/main/resources/jpa/static-weaving/module/loan => fineract-investor/src/main/resources/META-INF}/persistence.xml (84%) rename {fineract-accounting/src/main/resources/jpa/static-weaving/module/accounting => fineract-loan/src/main/resources/META-INF}/persistence.xml (74%) rename fineract-progressive-loan/src/main/resources/{jpa/static-weaving/module/progressive-loan => META-INF}/persistence.xml (86%) rename {fineract-investor/src/main/resources/jpa/static-weaving/module/investor => fineract-provider/src/main/resources/META-INF}/persistence.xml (71%) delete mode 100644 fineract-provider/src/main/resources/jpa/static-weaving/module/provider/persistence.xml create mode 100644 fineract-rates/src/main/resources/META-INF/persistence.xml rename {fineract-rates/src/main/resources/jpa/static-weaving/module/rates => fineract-report/src/main/resources/META-INF}/persistence.xml (80%) rename {fineract-document/src/main/resources/jpa/static-weaving/module/document => fineract-savings/src/main/resources/META-INF}/persistence.xml (73%) delete mode 100644 fineract-savings/src/main/resources/jpa/static-weaving/module/savings/persistence.xml rename {fineract-report/src/main/resources/jpa/static-weaving/module/report => fineract-tax/src/main/resources/META-INF}/persistence.xml (76%) diff --git a/build.gradle b/build.gradle index d0e066515..5b6371319 100644 --- a/build.gradle +++ b/build.gradle @@ -365,6 +365,10 @@ configure(project.fineractJavaProjects) { withJavadocJar() } + tasks.withType(ProcessResources).configureEach { + destinationDir = layout.buildDirectory.dir('classes/java/main').get().asFile + } + // Add performance optimizations configurations.configureEach { resolutionStrategy { diff --git a/custom/docker/build.gradle b/custom/docker/build.gradle index 66c91b399..2822fe537 100644 --- a/custom/docker/build.gradle +++ b/custom/docker/build.gradle @@ -58,6 +58,7 @@ jib { allowInsecureRegistries = true dependencies { + implementation project(':fineract-core') implementation project(':fineract-provider') // NOTE: dynamically load all custom modules file("${rootDir}/custom").eachDir { companyDir -> diff --git a/fineract-accounting/build.gradle b/fineract-accounting/build.gradle index eb91427a7..ceb6895f8 100644 --- a/fineract-accounting/build.gradle +++ b/fineract-accounting/build.gradle @@ -22,48 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/accounting/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -122,18 +106,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-accounting/src/main/resources/META-INF/persistence.xml b/fineract-accounting/src/main/resources/META-INF/persistence.xml new file mode 100644 index 000000000..3e2aa1743 --- /dev/null +++ b/fineract-accounting/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,51 @@ + + + + + + + + + + org.eclipse.persistence.jpa.PersistenceProvider + + org.apache.fineract.accounting.glaccount.domain.GLAccount + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.portfolio.paymenttype.domain.PaymentType + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory + org.apache.fineract.portfolio.tax.domain.TaxGroup + org.apache.fineract.portfolio.tax.domain.TaxGroupMappings + + org.apache.fineract.portfolio.charge.domain.Charge + false + + + + + diff --git a/fineract-avro-schemas/build.gradle b/fineract-avro-schemas/build.gradle index 49c061163..e94a01d94 100644 --- a/fineract-avro-schemas/build.gradle +++ b/fineract-avro-schemas/build.gradle @@ -132,4 +132,8 @@ tasks.named('sourcesJar') { duplicatesStrategy = DuplicatesStrategy.EXCLUDE } - +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } +} diff --git a/fineract-branch/build.gradle b/fineract-branch/build.gradle index b3c2c6ff3..505273c14 100644 --- a/fineract-branch/build.gradle +++ b/fineract-branch/build.gradle @@ -22,50 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/branch/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -130,18 +112,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-branch/src/main/resources/META-INF/persistence.xml b/fineract-branch/src/main/resources/META-INF/persistence.xml new file mode 100644 index 000000000..ef4086d55 --- /dev/null +++ b/fineract-branch/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,77 @@ + + + + + + + + + + org.eclipse.persistence.jpa.PersistenceProvider + org.apache.fineract.accounting.glaccount.domain.GLAccount + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image + org.apache.fineract.organisation.staff.domain.Staff + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.office.domain.OrganisationCurrency + org.apache.fineract.organisation.monetary.domain.ApplicationCurrency + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client + org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.portfolio.fund.domain.Fund + org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket + org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange + org.apache.fineract.portfolio.paymenttype.domain.PaymentType + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.tax.domain.TaxGroup + org.apache.fineract.portfolio.tax.domain.TaxGroupMappings + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory + org.apache.fineract.portfolio.floatingrates.domain.FloatingRate + org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod + org.apache.fineract.portfolio.calendar.domain.Calendar + org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping + + org.apache.fineract.portfolio.charge.domain.Charge + false + + + + + diff --git a/fineract-branch/src/main/resources/jpa/static-weaving/module/branch/persistence.xml b/fineract-branch/src/main/resources/jpa/static-weaving/module/branch/persistence.xml deleted file mode 100644 index 5e972e532..000000000 --- a/fineract-branch/src/main/resources/jpa/static-weaving/module/branch/persistence.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser - org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency - org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate - org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory - org.apache.fineract.portfolio.client.domain.ClientIdentifier - org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket - org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole - org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.accounting.closure.domain.GLClosure - org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount - org.apache.fineract.accounting.glaccount.domain.TrialBalance - org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping - org.apache.fineract.accounting.rule.domain.AccountingRule - org.apache.fineract.accounting.rule.domain.AccountingTagRule - org.apache.fineract.accounting.journalentry.domain.JournalEntry - - - org.apache.fineract.portfolio.charge.domain.Charge - - - org.apache.fineract.organisation.teller.domain.CashierTransaction - org.apache.fineract.organisation.teller.domain.Teller - org.apache.fineract.organisation.teller.domain.Cashier - org.apache.fineract.organisation.teller.domain.TellerTransaction - - - org.apache.fineract.portfolio.tax.domain.TaxComponent - org.apache.fineract.portfolio.tax.domain.TaxComponentHistory - org.apache.fineract.portfolio.tax.domain.TaxGroup - org.apache.fineract.portfolio.tax.domain.TaxGroupMappings - - - false - - - - - diff --git a/fineract-charge/build.gradle b/fineract-charge/build.gradle index 5128875f8..58b90df78 100644 --- a/fineract-charge/build.gradle +++ b/fineract-charge/build.gradle @@ -22,50 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/charge/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -130,18 +112,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-tax/src/main/resources/jpa/static-weaving/module/tax/persistence.xml b/fineract-charge/src/main/resources/META-INF/persistence.xml similarity index 81% rename from fineract-tax/src/main/resources/jpa/static-weaving/module/tax/persistence.xml rename to fineract-charge/src/main/resources/META-INF/persistence.xml index 5a440edcc..9d04d96a0 100644 --- a/fineract-tax/src/main/resources/jpa/static-weaving/module/tax/persistence.xml +++ b/fineract-charge/src/main/resources/META-INF/persistence.xml @@ -22,57 +22,53 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.office.domain.OrganisationCurrency org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.portfolio.fund.domain.Fund org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.portfolio.tax.domain.TaxComponent - org.apache.fineract.portfolio.tax.domain.TaxComponentHistory + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.floatingrates.domain.FloatingRate + org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod + org.apache.fineract.portfolio.calendar.domain.Calendar + org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping + org.apache.fineract.portfolio.tax.domain.TaxGroup org.apache.fineract.portfolio.tax.domain.TaxGroupMappings - + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory false diff --git a/fineract-charge/src/main/resources/jpa/static-weaving/module/charge/persistence.xml b/fineract-charge/src/main/resources/jpa/static-weaving/module/charge/persistence.xml deleted file mode 100644 index 695790147..000000000 --- a/fineract-charge/src/main/resources/jpa/static-weaving/module/charge/persistence.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser - org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency - org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate - org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory - org.apache.fineract.portfolio.client.domain.ClientIdentifier - org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket - org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole - org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.accounting.closure.domain.GLClosure - org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount - org.apache.fineract.accounting.glaccount.domain.TrialBalance - org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping - org.apache.fineract.accounting.rule.domain.AccountingRule - org.apache.fineract.accounting.rule.domain.AccountingTagRule - org.apache.fineract.accounting.journalentry.domain.JournalEntry - - - org.apache.fineract.portfolio.tax.domain.TaxComponent - org.apache.fineract.portfolio.tax.domain.TaxComponentHistory - org.apache.fineract.portfolio.tax.domain.TaxGroup - org.apache.fineract.portfolio.tax.domain.TaxGroupMappings - - - org.apache.fineract.portfolio.charge.domain.Charge - - false - - - - - diff --git a/fineract-command/build.gradle b/fineract-command/build.gradle index d585dce85..023b5b635 100644 --- a/fineract-command/build.gradle +++ b/fineract-command/build.gradle @@ -80,59 +80,3 @@ jmh { timeOnIteration = '2s' // Time per iteration benchmarkMode = ['thrpt'] // Default benchmark mode } - -tasks.register('staticWeaveJpa', JavaExec) { - dependsOn classes - - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/command/persistence.xml") - into "${persistenceInfo}/META-INF/" - } - - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") - classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] -} - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") -} - -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact -} - -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar -} - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-command/dependencies.gradle b/fineract-command/dependencies.gradle index 2a1355cb1..8186f1181 100644 --- a/fineract-command/dependencies.gradle +++ b/fineract-command/dependencies.gradle @@ -41,9 +41,6 @@ dependencies { 'com.ibm.icu:icu4j', 'org.yakworks:spring-icu4j', ) - implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { - exclude group: 'org.eclipse.persistence', module: 'jakarta.persistence' - } compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' diff --git a/fineract-command/src/main/java/org/apache/fineract/command/persistence/CommandRepository.java b/fineract-command/src/main/java/org/apache/fineract/command/persistence/CommandRepository.java index 3b261553f..98e4b3bd0 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/persistence/CommandRepository.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/persistence/CommandRepository.java @@ -18,7 +18,7 @@ */ package org.apache.fineract.command.persistence; -import org.apache.fineract.command.persistence.domain.CommandEntity; +import org.apache.fineract.command.persistence.model.CommandEntity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-command/src/main/java/org/apache/fineract/command/persistence/mapping/CommandMapper.java b/fineract-command/src/main/java/org/apache/fineract/command/persistence/mapping/CommandMapper.java index 31a2c4351..45487722d 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/persistence/mapping/CommandMapper.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/persistence/mapping/CommandMapper.java @@ -22,7 +22,7 @@ import static org.mapstruct.InjectionStrategy.CONSTRUCTOR; import static org.mapstruct.MappingConstants.ComponentModel.SPRING; import org.apache.fineract.command.core.Command; -import org.apache.fineract.command.persistence.domain.CommandEntity; +import org.apache.fineract.command.persistence.model.CommandEntity; import org.mapstruct.InheritInverseConfiguration; import org.mapstruct.Mapper; import org.mapstruct.Mapping; diff --git a/fineract-command/src/main/java/org/apache/fineract/command/persistence/domain/CommandEntity.java b/fineract-command/src/main/java/org/apache/fineract/command/persistence/model/CommandEntity.java similarity index 97% rename from fineract-command/src/main/java/org/apache/fineract/command/persistence/domain/CommandEntity.java rename to fineract-command/src/main/java/org/apache/fineract/command/persistence/model/CommandEntity.java index e7d5e4e86..06b78eec7 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/persistence/domain/CommandEntity.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/persistence/model/CommandEntity.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.fineract.command.persistence.domain; +package org.apache.fineract.command.persistence.model; import com.fasterxml.jackson.databind.JsonNode; import jakarta.persistence.Column; diff --git a/fineract-core/build.gradle b/fineract-core/build.gradle index 19281887d..1d0a8dc66 100644 --- a/fineract-core/build.gradle +++ b/fineract-core/build.gradle @@ -22,50 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { - dependsOn classes + group = "build" + description = "Performs EclipseLink static weaving of entity classes" - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/core/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + dependsOn classes, processResources - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + def classesDir = file(sourceSets.main.output.classesDirs.asPath) + + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir, classesDir, classesDir } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - configurations { providedRuntime // needed for Spring Boot executable WAR providedCompile @@ -90,7 +72,7 @@ configurations { apply from: 'dependencies.gradle' compileJava { - dependsOn ':fineract-avro-schemas:compileJava' + dependsOn ':fineract-avro-schemas:compileJava', processResources options.compilerArgs += ['-parameters'] } @@ -119,18 +101,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-command/src/main/resources/jpa/static-weaving/module/command/persistence.xml b/fineract-core/src/main/resources/META-INF/persistence.xml similarity index 74% rename from fineract-command/src/main/resources/jpa/static-weaving/module/command/persistence.xml rename to fineract-core/src/main/resources/META-INF/persistence.xml index 465ba382f..105688157 100644 --- a/fineract-command/src/main/resources/jpa/static-weaving/module/command/persistence.xml +++ b/fineract-core/src/main/resources/META-INF/persistence.xml @@ -22,19 +22,13 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.command.persistence.domain.CommandEntity - org.apache.fineract.command.persistence.converter.JsonAttributeConverter - false diff --git a/fineract-document/build.gradle b/fineract-document/build.gradle index dd1e3bf65..8410fbff3 100644 --- a/fineract-document/build.gradle +++ b/fineract-document/build.gradle @@ -22,50 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/document/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -118,18 +100,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-core/src/main/resources/jpa/static-weaving/module/core/persistence.xml b/fineract-document/src/main/resources/META-INF/persistence.xml similarity index 75% rename from fineract-core/src/main/resources/jpa/static-weaving/module/core/persistence.xml rename to fineract-document/src/main/resources/META-INF/persistence.xml index aeb8e6522..0c3e741c3 100644 --- a/fineract-core/src/main/resources/jpa/static-weaving/module/core/persistence.xml +++ b/fineract-document/src/main/resources/META-INF/persistence.xml @@ -22,51 +22,49 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.office.domain.OrganisationCurrency org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client + org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.fund.domain.Fund + org.apache.fineract.portfolio.paymenttype.domain.PaymentType org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.tax.domain.TaxGroup + org.apache.fineract.portfolio.tax.domain.TaxGroupMappings + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory org.apache.fineract.portfolio.calendar.domain.Calendar org.apache.fineract.portfolio.calendar.domain.CalendarHistory - org.apache.fineract.portfolio.client.domain.ClientIdentifier - org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket - org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole - org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping + + org.apache.fineract.portfolio.charge.domain.Charge false diff --git a/fineract-investor/build.gradle b/fineract-investor/build.gradle index ce13e7b06..5fdbf51e3 100644 --- a/fineract-investor/build.gradle +++ b/fineract-investor/build.gradle @@ -22,50 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/investor/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -124,18 +106,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-loan/src/main/resources/jpa/static-weaving/module/loan/persistence.xml b/fineract-investor/src/main/resources/META-INF/persistence.xml similarity index 84% rename from fineract-loan/src/main/resources/jpa/static-weaving/module/loan/persistence.xml rename to fineract-investor/src/main/resources/META-INF/persistence.xml index cf99a6070..e2d5a0b00 100644 --- a/fineract-loan/src/main/resources/jpa/static-weaving/module/loan/persistence.xml +++ b/fineract-investor/src/main/resources/META-INF/persistence.xml @@ -22,68 +22,61 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.monetary.domain.OrganisationCurrency org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.portfolio.fund.domain.Fund org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole - org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.accounting.closure.domain.GLClosure - org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount - org.apache.fineract.accounting.glaccount.domain.TrialBalance - org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping - org.apache.fineract.accounting.rule.domain.AccountingRule - org.apache.fineract.accounting.rule.domain.AccountingTagRule - org.apache.fineract.accounting.journalentry.domain.JournalEntry - - org.apache.fineract.portfolio.charge.domain.Charge - - + org.apache.fineract.portfolio.paymenttype.domain.PaymentType + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.tax.domain.TaxGroup + org.apache.fineract.portfolio.tax.domain.TaxGroupMappings + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory + org.apache.fineract.portfolio.floatingrates.domain.FloatingRate + org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod + org.apache.fineract.portfolio.calendar.domain.Calendar + org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping + + org.apache.fineract.portfolio.collateral.domain.LoanCollateral + org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement + org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucketMappings org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyTagHistory org.apache.fineract.portfolio.delinquency.domain.LoanInstallmentDelinquencyTag + org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter org.apache.fineract.portfolio.loanaccount.domain.GroupLoanIndividualMonitoringAccount org.apache.fineract.portfolio.loanaccount.domain.Loan org.apache.fineract.portfolio.loanaccount.domain.LoanCharge @@ -100,7 +93,6 @@ org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment org.apache.fineract.portfolio.loanaccount.domain.LoanRescheduleRequestToTermVariationMapping org.apache.fineract.portfolio.loanaccount.domain.LoanStatusChangeHistory - org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations org.apache.fineract.portfolio.loanaccount.domain.LoanTopupDetails org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheCharge @@ -108,9 +100,6 @@ org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionToRepaymentScheduleMapping - org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter - org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanRepaymentScheduleHistory - org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest org.apache.fineract.portfolio.loanproduct.domain.LoanProduct org.apache.fineract.portfolio.loanproduct.domain.LoanProductBorrowerCycleVariations org.apache.fineract.portfolio.loanproduct.domain.LoanProductConfigurableAttributes @@ -120,25 +109,20 @@ org.apache.fineract.portfolio.loanproduct.domain.LoanProductInterestRecalculationDetails org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule org.apache.fineract.portfolio.loanproduct.domain.LoanProductVariableInstallmentConfig - org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks + org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationType + org.apache.fineract.portfolio.loanproduct.domain.DueType + org.apache.fineract.portfolio.loanproduct.domain.AllocationType + org.apache.fineract.portfolio.loanproduct.domain.FutureInstallmentAllocationRule + org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTransactionType + org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter + org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule + org.apache.fineract.portfolio.loanproduct.domain.CreditAllocationTransactionType org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTypeListConverter org.apache.fineract.portfolio.loanproduct.domain.SupportedInterestRefundTypesListConverter - org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter - org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement - org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain - org.apache.fineract.portfolio.collateral.domain.LoanCollateral - - - org.apache.fineract.portfolio.tax.domain.TaxComponent - org.apache.fineract.portfolio.tax.domain.TaxComponentHistory - org.apache.fineract.portfolio.tax.domain.TaxGroup - org.apache.fineract.portfolio.tax.domain.TaxGroupMappings - - - org.apache.fineract.portfolio.floatingrates.domain.FloatingRate - org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod - - + org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter + org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest + org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks + org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter false diff --git a/fineract-loan/build.gradle b/fineract-loan/build.gradle index 3da2ce80e..5d333cbad 100644 --- a/fineract-loan/build.gradle +++ b/fineract-loan/build.gradle @@ -22,46 +22,31 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() + def classesDir = file("$buildDir/classes/java/main") + def metaInf = new File(classesDir, "META-INF") + metaInf.mkdirs() + copy { - from file("src/main/resources/jpa/static-weaving/module/loan/persistence.xml") - into "${persistenceInfo}/META-INF/" + from "src/main/resources/jpa/loan/persistence.xml" + into "$buildDir/classes/java/main/META-INF" } - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact -} - -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('classes') { + finalizedBy staticWeaveJpa } compileJava { @@ -129,17 +114,8 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } diff --git a/fineract-accounting/src/main/resources/jpa/static-weaving/module/accounting/persistence.xml b/fineract-loan/src/main/resources/META-INF/persistence.xml similarity index 74% rename from fineract-accounting/src/main/resources/jpa/static-weaving/module/accounting/persistence.xml rename to fineract-loan/src/main/resources/META-INF/persistence.xml index 60e55ff84..bb2388765 100644 --- a/fineract-accounting/src/main/resources/jpa/static-weaving/module/accounting/persistence.xml +++ b/fineract-loan/src/main/resources/META-INF/persistence.xml @@ -22,69 +22,56 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.monetary.domain.OrganisationCurrency org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.portfolio.fund.domain.Fund org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.accounting.closure.domain.GLClosure - org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount - org.apache.fineract.accounting.glaccount.domain.TrialBalance - org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping - org.apache.fineract.accounting.rule.domain.AccountingRule - org.apache.fineract.accounting.rule.domain.AccountingTagRule - org.apache.fineract.accounting.journalentry.domain.JournalEntry - - + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.floatingrates.domain.FloatingRate + org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod + org.apache.fineract.portfolio.calendar.domain.Calendar + org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping + org.apache.fineract.portfolio.charge.domain.Charge - - - org.apache.fineract.portfolio.tax.domain.TaxComponent - org.apache.fineract.portfolio.tax.domain.TaxComponentHistory + org.apache.fineract.portfolio.tax.domain.TaxGroup org.apache.fineract.portfolio.tax.domain.TaxGroupMappings - + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory + org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter false diff --git a/fineract-progressive-loan/build.gradle b/fineract-progressive-loan/build.gradle index 458189342..9017f54b4 100644 --- a/fineract-progressive-loan/build.gradle +++ b/fineract-progressive-loan/build.gradle @@ -22,50 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/progressive-loan/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -124,18 +106,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-progressive-loan/src/main/resources/jpa/static-weaving/module/progressive-loan/persistence.xml b/fineract-progressive-loan/src/main/resources/META-INF/persistence.xml similarity index 86% rename from fineract-progressive-loan/src/main/resources/jpa/static-weaving/module/progressive-loan/persistence.xml rename to fineract-progressive-loan/src/main/resources/META-INF/persistence.xml index 53b878af9..a5ff252eb 100644 --- a/fineract-progressive-loan/src/main/resources/jpa/static-weaving/module/progressive-loan/persistence.xml +++ b/fineract-progressive-loan/src/main/resources/META-INF/persistence.xml @@ -22,68 +22,57 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.office.domain.OrganisationCurrency org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.portfolio.fund.domain.Fund org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.accounting.closure.domain.GLClosure - org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount - org.apache.fineract.accounting.glaccount.domain.TrialBalance - org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping - org.apache.fineract.accounting.rule.domain.AccountingRule - org.apache.fineract.accounting.rule.domain.AccountingTagRule - org.apache.fineract.accounting.journalentry.domain.JournalEntry - - - org.apache.fineract.portfolio.charge.domain.Charge - - + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.floatingrates.domain.FloatingRate + org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod + org.apache.fineract.portfolio.calendar.domain.Calendar + org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping + + org.apache.fineract.portfolio.collateral.domain.LoanCollateral + org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement + org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucketMappings org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyTagHistory org.apache.fineract.portfolio.delinquency.domain.LoanInstallmentDelinquencyTag + org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter org.apache.fineract.portfolio.loanaccount.domain.GroupLoanIndividualMonitoringAccount org.apache.fineract.portfolio.loanaccount.domain.Loan org.apache.fineract.portfolio.loanaccount.domain.LoanCharge @@ -100,7 +89,6 @@ org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment org.apache.fineract.portfolio.loanaccount.domain.LoanRescheduleRequestToTermVariationMapping org.apache.fineract.portfolio.loanaccount.domain.LoanStatusChangeHistory - org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations org.apache.fineract.portfolio.loanaccount.domain.LoanTopupDetails org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheCharge @@ -108,9 +96,6 @@ org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionToRepaymentScheduleMapping - org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter - org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanRepaymentScheduleHistory - org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest org.apache.fineract.portfolio.loanproduct.domain.LoanProduct org.apache.fineract.portfolio.loanproduct.domain.LoanProductBorrowerCycleVariations org.apache.fineract.portfolio.loanproduct.domain.LoanProductConfigurableAttributes @@ -120,27 +105,35 @@ org.apache.fineract.portfolio.loanproduct.domain.LoanProductInterestRecalculationDetails org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule org.apache.fineract.portfolio.loanproduct.domain.LoanProductVariableInstallmentConfig - org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks + org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationType + org.apache.fineract.portfolio.loanproduct.domain.DueType + org.apache.fineract.portfolio.loanproduct.domain.AllocationType + org.apache.fineract.portfolio.loanproduct.domain.FutureInstallmentAllocationRule + org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTransactionType + org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter + org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule + org.apache.fineract.portfolio.loanproduct.domain.CreditAllocationTransactionType org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTypeListConverter org.apache.fineract.portfolio.loanproduct.domain.SupportedInterestRefundTypesListConverter - org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter - org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement - org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain - org.apache.fineract.portfolio.collateral.domain.LoanCollateral - - - org.apache.fineract.portfolio.tax.domain.TaxComponent - org.apache.fineract.portfolio.tax.domain.TaxComponentHistory + org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter + org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest + org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks + org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter + + org.apache.fineract.portfolio.charge.domain.Charge + + org.apache.fineract.accounting.closure.domain.GLClosure + org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount + org.apache.fineract.accounting.glaccount.domain.GLAccount + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping + org.apache.fineract.accounting.rule.domain.AccountingRule + org.apache.fineract.accounting.rule.domain.AccountingTagRule + org.apache.fineract.portfolio.tax.domain.TaxGroup org.apache.fineract.portfolio.tax.domain.TaxGroupMappings - - - org.apache.fineract.portfolio.floatingrates.domain.FloatingRate - org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod - - - org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeBalance - org.apache.fineract.portfolio.loanaccount.domain.ProgressiveLoanModel + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory false diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index 51d79f16a..8c7bfe536 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -31,54 +31,30 @@ apply plugin: 'se.thinkcode.cucumber-runner' check.dependsOn('cucumber') tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/provider/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -tasks.register("weavedPlainJar", Jar) { - archiveClassifier.set("plain") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - - from(layout.buildDirectory.dir("weaved-classes")) - - exclude("META-INF/persistence.xml") +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedPlainJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact -} - -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } tasks.named('staticWeaveJpa') { @@ -268,22 +244,7 @@ tasks.register('setBlankPassword') { } } -tasks.register("mergeWeavedOutput", Copy) { - dependsOn staticWeaveJpa - from layout.buildDirectory.dir("weaved-classes") - into layout.buildDirectory.dir("merged-weaved-classes/java/main") - // Optional: exclude files like persistence.xml - exclude("META-INF/persistence.xml") -} - bootRun { - dependsOn mergeWeavedOutput - - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - - classpath = files(weavedClasses) + sourceSets.main.runtimeClasspath.filter { file -> - file.name.endsWith('.jar') - } jvmArgs = [ "-Dspring.output.ansi.enabled=ALWAYS" ] @@ -298,64 +259,13 @@ springBoot { mainClass = 'org.apache.fineract.ServerApplication' } -// Create a new weavedBootJar task that extends BootJar -tasks.register("weavedBootJar", org.springframework.boot.gradle.tasks.bundling.BootJar) { - group = "build" - description = "Builds a bootable JAR with weaved classes" - dependsOn staticWeaveJpa - dependsOn resolve - - archiveClassifier.set("") - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - - //Required for bootable JAR - mainClass.set("org.apache.fineract.ServerApplication") - targetJavaVersion.set(JavaVersion.VERSION_21) - - // Replace default classes with weaved ones - into("BOOT-INF/classes") { - from(layout.buildDirectory.dir("weaved-classes")) - } - - manifest { - attributes( - 'Main-Class': 'org.springframework.boot.loader.launch.PropertiesLauncher', - 'Implementation-Title': 'Apache Fineract', - 'Implementation-Version': project.version, - 'Start-Class': 'org.apache.fineract.ServerApplication' - ) - } - classpath configurations.runtimeClasspath -} - -// Configure the bootJar task to include all dependencies -tasks.withType(org.springframework.boot.gradle.tasks.bundling.BootJar) { - // This ensures the launcher is included - requiresUnpack '**/*.jar' - - // This ensures the launcher classes are included - launchScript() -} - -// Make assemble depend on weavedBootJar instead of bootJar -tasks.named('assemble') { - dependsOn 'weavedBootJar' -} - -// Disable the default bootJar task bootJar { - dependsOn weavedBootJar - enabled = false -} - -// Ensure jib uses the weaved classes -tasks.named('jibDockerBuild') { - dependsOn 'staticWeaveJpa' -} - -// Ensure staticWeaveJpa runs before jib -tasks.named('jib') { - dependsOn 'staticWeaveJpa' + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + manifest { + attributes('Main-Class': 'org.springframework.boot.loader.launch.PropertiesLauncher', 'Implementation-Title': 'Apache Fineract', 'Implementation-Version': project.version) + } + archiveClassifier = '' + dependsOn resolve } jib { @@ -392,15 +302,6 @@ jib { user = 'nobody:nogroup' } - extraDirectories { - paths { - path { - from = layout.buildDirectory.dir("weaved-classes").get().asFile - into = '/app/classes' - } - } - } - allowInsecureRegistries = true dependencies { @@ -516,50 +417,3 @@ tasks.register('devRun', org.springframework.boot.gradle.tasks.run.BootRun) { println "Running in development mode - quality checks are disabled" } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} - -tasks.register("weavedCucumberTest", JavaExec) { - group = "verification" - description = "Runs Cucumber tests with weaved classes" - - dependsOn staticWeaveJpa, compileTestJava, processTestResources - - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) - - mainClass.set("io.cucumber.core.cli.Main") // Cucumber JUnit 5 CLI entrypoint - - args = [ - '--glue', 'org.apache.fineract', // your step defs package - 'src/test/resources/features' // your feature files path - ] - - jvmArgs = ["-Dspring.output.ansi.enabled=ALWAYS"] -} - -tasks.named("cucumber") { - dependsOn weavedCucumberTest - enabled = false -} diff --git a/fineract-investor/src/main/resources/jpa/static-weaving/module/investor/persistence.xml b/fineract-provider/src/main/resources/META-INF/persistence.xml similarity index 71% rename from fineract-investor/src/main/resources/jpa/static-weaving/module/investor/persistence.xml rename to fineract-provider/src/main/resources/META-INF/persistence.xml index 4468eb515..eba5ded16 100644 --- a/fineract-investor/src/main/resources/jpa/static-weaving/module/investor/persistence.xml +++ b/fineract-provider/src/main/resources/META-INF/persistence.xml @@ -22,73 +22,59 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency - org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.documentmanagement.domain.Image + org.apache.fineract.organisation.holiday.domain.Holiday org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.organisation.monetary.domain.OrganisationCurrency + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.staff.domain.Staff + org.apache.fineract.organisation.workingdays.domain.WorkingDays org.apache.fineract.portfolio.calendar.domain.Calendar org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.portfolio.client.domain.Client org.apache.fineract.portfolio.client.domain.ClientIdentifier org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.floatingrates.domain.FloatingRate + org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod + org.apache.fineract.portfolio.fund.domain.Fund org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole - org.apache.fineract.portfolio.paymenttype.domain.PaymentType org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.accounting.closure.domain.GLClosure - org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount - org.apache.fineract.accounting.glaccount.domain.TrialBalance - org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping - org.apache.fineract.accounting.rule.domain.AccountingRule - org.apache.fineract.accounting.rule.domain.AccountingTagRule - org.apache.fineract.accounting.journalentry.domain.JournalEntry - - - org.apache.fineract.portfolio.charge.domain.Charge - - + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.paymenttype.domain.PaymentType + org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.AppUserClientMapping + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.investor.domain.ExternalAssetOwner - org.apache.fineract.investor.domain.ExternalAssetOwnerLoanProductAttributes + org.apache.fineract.investor.domain.ExternalAssetOwnerJournalEntryMapping org.apache.fineract.investor.domain.ExternalAssetOwnerTransfer org.apache.fineract.investor.domain.ExternalAssetOwnerTransferDetails org.apache.fineract.investor.domain.ExternalAssetOwnerTransferJournalEntryMapping org.apache.fineract.investor.domain.ExternalAssetOwnerTransferLoanMapping - org.apache.fineract.investor.domain.ExternalAssetOwnerJournalEntryMapping - - + + org.apache.fineract.portfolio.collateral.domain.LoanCollateral + org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement + org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucketMappings org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyTagHistory @@ -99,6 +85,7 @@ org.apache.fineract.portfolio.loanaccount.domain.LoanChargePaidBy org.apache.fineract.portfolio.loanaccount.domain.LoanCollateralManagement org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule + org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule org.apache.fineract.portfolio.loanaccount.domain.LoanDisbursementDetails org.apache.fineract.portfolio.loanaccount.domain.LoanInstallmentCharge org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails @@ -109,7 +96,6 @@ org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment org.apache.fineract.portfolio.loanaccount.domain.LoanRescheduleRequestToTermVariationMapping org.apache.fineract.portfolio.loanaccount.domain.LoanStatusChangeHistory - org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations org.apache.fineract.portfolio.loanaccount.domain.LoanTopupDetails org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheCharge @@ -118,8 +104,13 @@ org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionToRepaymentScheduleMapping org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter - org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanRepaymentScheduleHistory + org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest + org.apache.fineract.portfolio.loanproduct.domain.AllocationType + org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter + org.apache.fineract.portfolio.loanproduct.domain.CreditAllocationTransactionType + org.apache.fineract.portfolio.loanproduct.domain.DueType + org.apache.fineract.portfolio.loanproduct.domain.FutureInstallmentAllocationRule org.apache.fineract.portfolio.loanproduct.domain.LoanProduct org.apache.fineract.portfolio.loanproduct.domain.LoanProductBorrowerCycleVariations org.apache.fineract.portfolio.loanproduct.domain.LoanProductConfigurableAttributes @@ -129,24 +120,48 @@ org.apache.fineract.portfolio.loanproduct.domain.LoanProductInterestRecalculationDetails org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule org.apache.fineract.portfolio.loanproduct.domain.LoanProductVariableInstallmentConfig - org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks + org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTransactionType + org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationType org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTypeListConverter org.apache.fineract.portfolio.loanproduct.domain.SupportedInterestRefundTypesListConverter - org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter - org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement - org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain - org.apache.fineract.portfolio.collateral.domain.LoanCollateral - - + org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks + org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter + + org.apache.fineract.interoperation.domain.InteropIdentifier + org.apache.fineract.portfolio.interestratechart.domain.InterestIncentives + org.apache.fineract.portfolio.interestratechart.domain.InterestRateChart + org.apache.fineract.portfolio.interestratechart.domain.InterestRateChartSlab + org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentives + org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChart + org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChartSlabs + org.apache.fineract.portfolio.savings.domain.DepositAccountOnHoldTransaction + org.apache.fineract.portfolio.savings.domain.DepositAccountTermAndPreClosure + org.apache.fineract.portfolio.savings.domain.DepositProductRecurringDetail + org.apache.fineract.portfolio.savings.domain.DepositProductTermAndPreClosure + org.apache.fineract.portfolio.savings.domain.FixedDepositAccount + org.apache.fineract.portfolio.savings.domain.FixedDepositProduct + org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring + org.apache.fineract.portfolio.savings.domain.RecurringDepositAccount + org.apache.fineract.portfolio.savings.domain.RecurringDepositProduct + org.apache.fineract.portfolio.savings.domain.SavingsAccount + org.apache.fineract.portfolio.savings.domain.SavingsAccountCharge + org.apache.fineract.portfolio.savings.domain.SavingsAccountChargePaidBy + org.apache.fineract.portfolio.savings.domain.SavingsAccountTransaction + org.apache.fineract.portfolio.savings.domain.SavingsAccountTransactionTaxDetails + org.apache.fineract.portfolio.savings.domain.SavingsOfficerAssignmentHistory + org.apache.fineract.portfolio.savings.domain.SavingsProduct + + org.apache.fineract.accounting.rule.domain.AccountingRule + org.apache.fineract.accounting.rule.domain.AccountingTagRule + + org.apache.fineract.infrastructure.documentmanagement.domain.Document + + org.apache.fineract.portfolio.charge.domain.Charge + org.apache.fineract.portfolio.tax.domain.TaxComponent org.apache.fineract.portfolio.tax.domain.TaxComponentHistory org.apache.fineract.portfolio.tax.domain.TaxGroup org.apache.fineract.portfolio.tax.domain.TaxGroupMappings - - - org.apache.fineract.portfolio.floatingrates.domain.FloatingRate - org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod - false diff --git a/fineract-provider/src/main/resources/jpa/static-weaving/module/provider/persistence.xml b/fineract-provider/src/main/resources/jpa/static-weaving/module/provider/persistence.xml deleted file mode 100644 index fb51c9430..000000000 --- a/fineract-provider/src/main/resources/jpa/static-weaving/module/provider/persistence.xml +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - - - - - org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser - org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency - org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate - org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory - org.apache.fineract.portfolio.client.domain.ClientIdentifier - org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket - org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole - org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.accounting.closure.domain.GLClosure - org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount - org.apache.fineract.accounting.glaccount.domain.TrialBalance - org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping - org.apache.fineract.accounting.rule.domain.AccountingRule - org.apache.fineract.accounting.rule.domain.AccountingTagRule - org.apache.fineract.accounting.journalentry.domain.JournalEntry - - - org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken - org.apache.fineract.infrastructure.creditbureau.domain.CreditReport - org.apache.fineract.infrastructure.creditbureau.domain.CreditBureau - org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauLoanProductMapping - org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauConfiguration - org.apache.fineract.infrastructure.creditbureau.domain.OrganisationCreditBureau - - - org.apache.fineract.infrastructure.configuration.domain.ExternalService - org.apache.fineract.infrastructure.configuration.domain.GlobalConfigurationProperty - org.apache.fineract.infrastructure.configuration.domain.ExternalServicesProperties - - - org.apache.fineract.infrastructure.bulkimport.domain.ImportDocument - - - org.apache.fineract.infrastructure.survey.domain.Likelihood - - - org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityRelation - org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityToEntityMapping - org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityAccess - - - org.apache.fineract.infrastructure.sms.domain.SmsMessage - org.apache.fineract.infrastructure.campaigns.sms.domain.SmsCampaign - - - org.apache.fineract.infrastructure.security.domain.TFAccessToken - org.apache.fineract.infrastructure.security.domain.TwoFactorConfiguration - - - org.apache.fineract.infrastructure.campaigns.email.domain.EmailCampaign - org.apache.fineract.infrastructure.campaigns.email.domain.EmailConfiguration - org.apache.fineract.infrastructure.campaigns.email.domain.EmailMessage - - - org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormat - - - org.apache.fineract.portfolio.client.domain.ClientFamilyMembers - org.apache.fineract.portfolio.client.domain.ClientNonPerson - org.apache.fineract.portfolio.client.domain.ClientTransferDetails - org.apache.fineract.portfolio.client.domain.ClientAddress - org.apache.fineract.portfolio.client.domain.ClientCharge - org.apache.fineract.portfolio.client.domain.ClientTransaction - org.apache.fineract.portfolio.client.domain.ClientChargePaidBy - - - org.apache.fineract.portfolio.meeting.domain.Meeting - org.apache.fineract.portfolio.meeting.attendance.domain.ClientAttendance - - - org.apache.fineract.infrastructure.hooks.domain.Hook - org.apache.fineract.infrastructure.hooks.domain.HookResource - org.apache.fineract.infrastructure.hooks.domain.HookTemplate - org.apache.fineract.infrastructure.hooks.domain.Schema - org.apache.fineract.infrastructure.hooks.domain.HookConfiguration - - - org.apache.fineract.portfolio.address.domain.FieldConfiguration - org.apache.fineract.portfolio.address.domain.Address - - - org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityRelation - org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityToEntityMapping - org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityAccess - - - org.apache.fineract.portfolio.self.account.domain.SelfBeneficiariesTPT - org.apache.fineract.portfolio.self.device.domain.DeviceRegistration - org.apache.fineract.portfolio.self.pockets.domain.Pocket - org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMapping - org.apache.fineract.portfolio.self.registration.domain.SelfServiceRegistration - - - - org.apache.fineract.command.persistence.domain.CommandEntity - org.apache.fineract.command.persistence.converter.JsonAttributeConverter - - - org.apache.fineract.portfolio.charge.domain.Charge - - - org.apache.fineract.organisation.teller.domain.CashierTransaction - org.apache.fineract.organisation.teller.domain.Teller - org.apache.fineract.organisation.teller.domain.Cashier - org.apache.fineract.organisation.teller.domain.TellerTransaction - - - org.apache.fineract.investor.domain.ExternalAssetOwner - org.apache.fineract.investor.domain.ExternalAssetOwnerLoanProductAttributes - org.apache.fineract.investor.domain.ExternalAssetOwnerTransfer - org.apache.fineract.investor.domain.ExternalAssetOwnerTransferDetails - org.apache.fineract.investor.domain.ExternalAssetOwnerTransferJournalEntryMapping - org.apache.fineract.investor.domain.ExternalAssetOwnerTransferLoanMapping - org.apache.fineract.investor.domain.ExternalAssetOwnerJournalEntryMapping - - - org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucketMappings - org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction - org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyTagHistory - org.apache.fineract.portfolio.delinquency.domain.LoanInstallmentDelinquencyTag - org.apache.fineract.portfolio.loanaccount.domain.GroupLoanIndividualMonitoringAccount - org.apache.fineract.portfolio.loanaccount.domain.Loan - org.apache.fineract.portfolio.loanaccount.domain.LoanCharge - org.apache.fineract.portfolio.loanaccount.domain.LoanChargePaidBy - org.apache.fineract.portfolio.loanaccount.domain.LoanCollateralManagement - org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule - org.apache.fineract.portfolio.loanaccount.domain.LoanDisbursementDetails - org.apache.fineract.portfolio.loanaccount.domain.LoanInstallmentCharge - org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails - org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalculationDetails - org.apache.fineract.portfolio.loanaccount.domain.LoanOfficerAssignmentHistory - org.apache.fineract.portfolio.loanaccount.domain.LoanOverdueInstallmentCharge - org.apache.fineract.portfolio.loanaccount.domain.LoanPaymentAllocationRule - org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment - org.apache.fineract.portfolio.loanaccount.domain.LoanRescheduleRequestToTermVariationMapping - org.apache.fineract.portfolio.loanaccount.domain.LoanStatusChangeHistory - org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter - org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations - org.apache.fineract.portfolio.loanaccount.domain.LoanTopupDetails - org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheCharge - org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheDisbursementCharge - org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction - org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation - org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionToRepaymentScheduleMapping - org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter - org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanRepaymentScheduleHistory - org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest - org.apache.fineract.portfolio.loanproduct.domain.LoanProduct - org.apache.fineract.portfolio.loanproduct.domain.LoanProductBorrowerCycleVariations - org.apache.fineract.portfolio.loanproduct.domain.LoanProductConfigurableAttributes - org.apache.fineract.portfolio.loanproduct.domain.LoanProductCreditAllocationRule - org.apache.fineract.portfolio.loanproduct.domain.LoanProductFloatingRates - org.apache.fineract.portfolio.loanproduct.domain.LoanProductGuaranteeDetails - org.apache.fineract.portfolio.loanproduct.domain.LoanProductInterestRecalculationDetails - org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule - org.apache.fineract.portfolio.loanproduct.domain.LoanProductVariableInstallmentConfig - org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks - org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTypeListConverter - org.apache.fineract.portfolio.loanproduct.domain.SupportedInterestRefundTypesListConverter - org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter - org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement - org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain - org.apache.fineract.portfolio.collateral.domain.LoanCollateral - - - org.apache.fineract.infrastructure.documentmanagement.domain.Document - - - org.apache.fineract.portfolio.tax.domain.TaxComponent - org.apache.fineract.portfolio.tax.domain.TaxComponentHistory - org.apache.fineract.portfolio.tax.domain.TaxGroup - org.apache.fineract.portfolio.tax.domain.TaxGroupMappings - - - org.apache.fineract.portfolio.floatingrates.domain.FloatingRate - org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod - - - org.apache.fineract.interoperation.domain.InteropIdentifier - org.apache.fineract.portfolio.interestratechart.domain.InterestIncentives - org.apache.fineract.portfolio.interestratechart.domain.InterestRateChart - org.apache.fineract.portfolio.interestratechart.domain.InterestRateChartSlab - org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentive - org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentives - org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChart - org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChartSlabs - org.apache.fineract.portfolio.savings.domain.DepositAccountOnHoldTransaction - org.apache.fineract.portfolio.savings.domain.DepositAccountTermAndPreClosure - org.apache.fineract.portfolio.savings.domain.DepositProductRecurringDetail - org.apache.fineract.portfolio.savings.domain.DepositProductTermAndPreClosure - org.apache.fineract.portfolio.savings.domain.FixedDepositProduct - org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring - org.apache.fineract.portfolio.savings.domain.RecurringDepositProduct - org.apache.fineract.portfolio.savings.domain.SavingsAccount - org.apache.fineract.portfolio.savings.domain.SavingsAccountCharge - org.apache.fineract.portfolio.savings.domain.SavingsAccountChargePaidBy - org.apache.fineract.portfolio.savings.domain.SavingsAccountTransaction - org.apache.fineract.portfolio.savings.domain.SavingsAccountTransactionTaxDetails - org.apache.fineract.portfolio.savings.domain.SavingsOfficerAssignmentHistory - org.apache.fineract.portfolio.savings.domain.SavingsProduct - - - org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeBalance - org.apache.fineract.portfolio.loanaccount.domain.ProgressiveLoanModel - - - org.apache.fineract.portfolio.account.domain.AccountAssociations - org.apache.fineract.portfolio.account.domain.AccountTransferDetails - org.apache.fineract.portfolio.account.domain.AccountTransferStandingInstruction - org.apache.fineract.portfolio.account.domain.AccountTransferTransaction - - - - org.apache.fineract.notification.domain.NotificationMapper - org.apache.fineract.notification.domain.Notification - - - org.apache.fineract.adhocquery.domain.AdHoc - - - org.apache.fineract.mix.domain.MixTaxonomyMapping - - - org.apache.fineract.cob.domain.LoanAccountLock - org.apache.fineract.cob.domain.BatchBusinessStep - - - org.apache.fineract.template.domain.Template - org.apache.fineract.template.domain.TemplateMapper - - - org.apache.fineract.accounting.provisioning.domain.LoanProductProvisioningEntry - org.apache.fineract.accounting.provisioning.domain.ProvisioningEntry - - - org.apache.fineract.useradministration.domain.AppUserPreviousPassword - org.apache.fineract.useradministration.domain.PasswordValidationPolicy - - - org.apache.fineract.spm.domain.Question - org.apache.fineract.spm.domain.LookupTable - org.apache.fineract.spm.domain.Component - org.apache.fineract.spm.domain.Scorecard - org.apache.fineract.spm.domain.Survey - org.apache.fineract.spm.domain.Response - - - org.apache.fineract.portfolio.loanproduct.productmix.domain.ProductMix - - - org.apache.fineract.organisation.provisioning.domain.ProvisioningCriteria - org.apache.fineract.organisation.provisioning.domain.LoanProductProvisionCriteria - org.apache.fineract.organisation.provisioning.domain.ProvisioningCriteriaDefinition - org.apache.fineract.organisation.provisioning.domain.ProvisioningCategory - - - org.apache.fineract.organisation.office.domain.OfficeTransaction - - - org.apache.fineract.portfolio.self.registration.domain.SelfServiceRegistration - - - org.apache.fineract.portfolio.note.domain.Note - - - org.apache.fineract.portfolio.savings.domain.RecurringDepositScheduleInstallment - org.apache.fineract.portfolio.savings.domain.FixedDepositAccount - org.apache.fineract.portfolio.savings.domain.RecurringDepositAccount - org.apache.fineract.portfolio.savings.domain.DepositAccountRecurringDetail - - - org.apache.fineract.portfolio.shareproducts.domain.ShareProductDividendPayOutDetails - org.apache.fineract.portfolio.shareproducts.domain.ShareProduct - org.apache.fineract.portfolio.shareproducts.domain.ShareProductMarketPrice - - - org.apache.fineract.portfolio.shareaccounts.domain.ShareAccount - org.apache.fineract.portfolio.shareaccounts.domain.ShareAccountCharge - org.apache.fineract.portfolio.shareaccounts.domain.ShareAccountChargePaidBy - org.apache.fineract.portfolio.shareaccounts.domain.ShareAccountDividendDetails - org.apache.fineract.portfolio.shareaccounts.domain.ShareAccountTransaction - - - org.apache.fineract.infrastructure.reportmailingjob.domain.ReportMailingJob - org.apache.fineract.infrastructure.reportmailingjob.domain.ReportMailingJobConfiguration - org.apache.fineract.infrastructure.reportmailingjob.domain.ReportMailingJobRunHistory - - - org.apache.fineract.infrastructure.dataqueries.domain.RegisteredDatatable - org.apache.fineract.infrastructure.dataqueries.domain.Report - org.apache.fineract.infrastructure.dataqueries.domain.ReportParameterUsage - org.apache.fineract.infrastructure.dataqueries.domain.ReportParameter - org.apache.fineract.infrastructure.dataqueries.domain.EntityDatatableChecks - - - org.apache.fineract.portfolio.loanaccount.guarantor.domain.GuarantorFundingDetails - org.apache.fineract.portfolio.loanaccount.guarantor.domain.GuarantorFundingTransaction - org.apache.fineract.portfolio.loanaccount.guarantor.domain.Guarantor - - false - - - - - diff --git a/fineract-rates/build.gradle b/fineract-rates/build.gradle index c6cbed7ef..36e88f449 100644 --- a/fineract-rates/build.gradle +++ b/fineract-rates/build.gradle @@ -22,50 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/rates/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -130,18 +112,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-rates/src/main/resources/META-INF/persistence.xml b/fineract-rates/src/main/resources/META-INF/persistence.xml new file mode 100644 index 000000000..b76d09e1a --- /dev/null +++ b/fineract-rates/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,78 @@ + + + + + + + + + + org.eclipse.persistence.jpa.PersistenceProvider + + org.apache.fineract.accounting.glaccount.domain.GLAccount + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image + org.apache.fineract.organisation.staff.domain.Staff + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.office.domain.OrganisationCurrency + org.apache.fineract.organisation.monetary.domain.ApplicationCurrency + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client + org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.portfolio.fund.domain.Fund + org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket + org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange + org.apache.fineract.portfolio.paymenttype.domain.PaymentType + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.tax.domain.TaxGroup + org.apache.fineract.portfolio.tax.domain.TaxGroupMappings + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory + org.apache.fineract.portfolio.floatingrates.domain.FloatingRate + org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod + org.apache.fineract.portfolio.calendar.domain.Calendar + org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping + + org.apache.fineract.portfolio.charge.domain.Charge + false + + + + + diff --git a/fineract-report/build.gradle b/fineract-report/build.gradle index 7e1d51567..16e958dfe 100644 --- a/fineract-report/build.gradle +++ b/fineract-report/build.gradle @@ -22,50 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/report/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -130,18 +112,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-rates/src/main/resources/jpa/static-weaving/module/rates/persistence.xml b/fineract-report/src/main/resources/META-INF/persistence.xml similarity index 80% rename from fineract-rates/src/main/resources/jpa/static-weaving/module/rates/persistence.xml rename to fineract-report/src/main/resources/META-INF/persistence.xml index f6aa61581..d3ba0d405 100644 --- a/fineract-rates/src/main/resources/jpa/static-weaving/module/rates/persistence.xml +++ b/fineract-report/src/main/resources/META-INF/persistence.xml @@ -22,55 +22,52 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.office.domain.OrganisationCurrency org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.portfolio.fund.domain.Fund org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.tax.domain.TaxGroup + org.apache.fineract.portfolio.tax.domain.TaxGroupMappings + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory org.apache.fineract.portfolio.floatingrates.domain.FloatingRate org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod - + org.apache.fineract.portfolio.calendar.domain.Calendar + org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping false diff --git a/fineract-savings/build.gradle b/fineract-savings/build.gradle index e915417d4..7e6b6eb97 100644 --- a/fineract-savings/build.gradle +++ b/fineract-savings/build.gradle @@ -21,53 +21,33 @@ description = 'Fineract Savings' apply plugin: 'java' apply plugin: 'eclipse' +tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + + dependsOn classes + + def classesDir = file("$buildDir/classes/java/main") + + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') + classpath = sourceSets.main.runtimeClasspath + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath +} + +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" +} + tasks.named('classes') { finalizedBy staticWeaveJpa } -tasks.register('staticWeaveJpa', JavaExec) { - dependsOn classes - - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/savings/persistence.xml") - into "${persistenceInfo}/META-INF/" - } - - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") - classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") -} - -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact -} - -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar -} - - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -132,18 +112,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-document/src/main/resources/jpa/static-weaving/module/document/persistence.xml b/fineract-savings/src/main/resources/META-INF/persistence.xml similarity index 73% rename from fineract-document/src/main/resources/jpa/static-weaving/module/document/persistence.xml rename to fineract-savings/src/main/resources/META-INF/persistence.xml index 7b0325007..fcd1b4aa3 100644 --- a/fineract-document/src/main/resources/jpa/static-weaving/module/document/persistence.xml +++ b/fineract-savings/src/main/resources/META-INF/persistence.xml @@ -22,54 +22,50 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.office.domain.OrganisationCurrency org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client + org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.fund.domain.Fund + org.apache.fineract.portfolio.paymenttype.domain.PaymentType org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail org.apache.fineract.portfolio.calendar.domain.Calendar org.apache.fineract.portfolio.calendar.domain.CalendarHistory - org.apache.fineract.portfolio.client.domain.ClientIdentifier - org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket - org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole - org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.infrastructure.documentmanagement.domain.Document - + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping + + org.apache.fineract.portfolio.charge.domain.Charge + + org.apache.fineract.portfolio.tax.domain.TaxGroup + org.apache.fineract.portfolio.tax.domain.TaxGroupMappings + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory false diff --git a/fineract-savings/src/main/resources/jpa/static-weaving/module/savings/persistence.xml b/fineract-savings/src/main/resources/jpa/static-weaving/module/savings/persistence.xml deleted file mode 100644 index 60ec696bb..000000000 --- a/fineract-savings/src/main/resources/jpa/static-weaving/module/savings/persistence.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser - org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency - org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate - org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory - org.apache.fineract.portfolio.client.domain.ClientIdentifier - org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket - org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole - org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - - - org.apache.fineract.accounting.closure.domain.GLClosure - org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount - org.apache.fineract.accounting.glaccount.domain.TrialBalance - org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping - org.apache.fineract.accounting.rule.domain.AccountingRule - org.apache.fineract.accounting.rule.domain.AccountingTagRule - org.apache.fineract.accounting.journalentry.domain.JournalEntry - - - - org.apache.fineract.portfolio.tax.domain.TaxComponent - org.apache.fineract.portfolio.tax.domain.TaxComponentHistory - org.apache.fineract.portfolio.tax.domain.TaxGroup - org.apache.fineract.portfolio.tax.domain.TaxGroupMappings - - - org.apache.fineract.portfolio.floatingrates.domain.FloatingRate - org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod - - - org.apache.fineract.interoperation.domain.InteropIdentifier - org.apache.fineract.portfolio.interestratechart.domain.InterestIncentives - org.apache.fineract.portfolio.interestratechart.domain.InterestRateChart - org.apache.fineract.portfolio.interestratechart.domain.InterestRateChartSlab - org.apache.fineract.portfolio.interestratechart.domain.InterestRateChartFields - org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentive - org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentives - org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChart - org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChartSlabs - org.apache.fineract.portfolio.savings.domain.DepositAccountOnHoldTransaction - org.apache.fineract.portfolio.savings.domain.DepositAccountTermAndPreClosure - org.apache.fineract.portfolio.savings.domain.DepositProductRecurringDetail - org.apache.fineract.portfolio.savings.domain.DepositProductTermAndPreClosure - org.apache.fineract.portfolio.savings.domain.FixedDepositProduct - org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring - org.apache.fineract.portfolio.savings.domain.RecurringDepositProduct - org.apache.fineract.portfolio.savings.domain.SavingsAccount - org.apache.fineract.portfolio.savings.domain.SavingsAccountCharge - org.apache.fineract.portfolio.savings.domain.SavingsAccountChargePaidBy - org.apache.fineract.portfolio.savings.domain.SavingsAccountTransaction - org.apache.fineract.portfolio.savings.domain.SavingsAccountTransactionTaxDetails - org.apache.fineract.portfolio.savings.domain.SavingsOfficerAssignmentHistory - org.apache.fineract.portfolio.savings.domain.SavingsProduct - - - org.apache.fineract.portfolio.charge.domain.Charge - - false - - - - - diff --git a/fineract-tax/build.gradle b/fineract-tax/build.gradle index 170bb0c38..a03a02887 100644 --- a/fineract-tax/build.gradle +++ b/fineract-tax/build.gradle @@ -22,50 +22,32 @@ apply plugin: 'java' apply plugin: 'eclipse' tasks.register('staticWeaveJpa', JavaExec) { + group = "build" + description = "Performs EclipseLink static weaving of entity classes" + dependsOn classes - def classesDir = layout.buildDirectory.dir("classes/java/main").get().asFile - def outputDir = layout.buildDirectory.dir("weaved-classes").get().asFile - def persistenceInfo = layout.buildDirectory.dir('static-weaving').get() - copy { - from file("src/main/resources/jpa/static-weaving/module/tax/persistence.xml") - into "${persistenceInfo}/META-INF/" - } + def classesDir = file("$buildDir/classes/java/main") - mainClass.set("org.eclipse.persistence.tools.weaving.jpa.StaticWeave") + mainClass.set('org.eclipse.persistence.tools.weaving.jpa.StaticWeave') classpath = sourceSets.main.runtimeClasspath - - args = [ - '-persistenceinfo', persistenceInfo, - classesDir.absolutePath, - outputDir.absolutePath - ] + args '-persistenceinfo', classesDir.absolutePath, classesDir.absolutePath, classesDir.absolutePath } - - -tasks.register("weavedJar", Jar) { - archiveClassifier.set("") - dependsOn staticWeaveJpa - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - from(layout.buildDirectory.dir("weaved-classes")) - exclude("META-INF/persistence.xml") +staticWeaveJpa.doLast { + delete "${sourceSets.main.output.classesDirs.asPath}/META-INF/persistence.xml" } -// Configure the default jar task to depend on weavedJar and use its output -tasks.named('jar') { - dependsOn weavedJar - enabled = false // Disable the default jar task - // The weavedJar will be used as the primary artifact +tasks.named('classes') { + finalizedBy staticWeaveJpa } -// Make sure the assemble task depends on weavedJar -tasks.named('assemble') { - dependsOn weavedJar +tasks.named('processResources') { + from('src/main/resources') + into sourceSets.main.java.classesDirectory + outputs.upToDateWhen { false } } - - compileJava { dependsOn ':fineract-avro-schemas:buildJavaSdk' } @@ -130,18 +112,3 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { } } } - -tasks.named("test") { - dependsOn staticWeaveJpa - - def testClasses = layout.buildDirectory.dir("classes/java/test").get().asFile - def weavedClasses = layout.buildDirectory.dir("weaved-classes").get().asFile - def testResources = layout.buildDirectory.dir("resources/test").get().asFile - - classpath = files( - weavedClasses, - testClasses, - testResources, - configurations.testRuntimeClasspath - ) -} diff --git a/fineract-report/src/main/resources/jpa/static-weaving/module/report/persistence.xml b/fineract-tax/src/main/resources/META-INF/persistence.xml similarity index 76% rename from fineract-report/src/main/resources/jpa/static-weaving/module/report/persistence.xml rename to fineract-tax/src/main/resources/META-INF/persistence.xml index aeb8e6522..d3ba0d405 100644 --- a/fineract-report/src/main/resources/jpa/static-weaving/module/report/persistence.xml +++ b/fineract-tax/src/main/resources/META-INF/persistence.xml @@ -22,51 +22,52 @@ + xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> org.eclipse.persistence.jpa.PersistenceProvider - - - org.apache.fineract.useradministration.domain.Role - org.apache.fineract.portfolio.fund.domain.Fund - org.apache.fineract.infrastructure.documentmanagement.domain.Image - org.apache.fineract.organisation.workingdays.domain.WorkingDays - org.apache.fineract.useradministration.domain.Permission - org.apache.fineract.useradministration.domain.AppUserClientMapping - org.apache.fineract.commands.domain.CommandSource - org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.accounting.glaccount.domain.GLAccount - org.apache.fineract.organisation.monetary.domain.OrganisationCurrency + org.apache.fineract.accounting.journalentry.domain.JournalEntry + org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom + org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom + org.apache.fineract.infrastructure.codes.domain.Code + org.apache.fineract.infrastructure.codes.domain.CodeValue + org.apache.fineract.infrastructure.documentmanagement.domain.Image org.apache.fineract.organisation.staff.domain.Staff - org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.organisation.office.domain.Office + org.apache.fineract.organisation.office.domain.OrganisationCurrency org.apache.fineract.organisation.monetary.domain.ApplicationCurrency - org.apache.fineract.portfolio.calendar.domain.CalendarInstance - org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail - org.apache.fineract.portfolio.calendar.domain.Calendar - org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.organisation.holiday.domain.Holiday + org.apache.fineract.organisation.workingdays.domain.WorkingDays + org.apache.fineract.portfolio.group.domain.Group + org.apache.fineract.portfolio.group.domain.GroupLevel + org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory + org.apache.fineract.portfolio.group.domain.GroupRole + org.apache.fineract.portfolio.client.domain.Client org.apache.fineract.portfolio.client.domain.ClientIdentifier + org.apache.fineract.portfolio.rate.domain.Rate + org.apache.fineract.portfolio.fund.domain.Fund org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange - org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory - org.apache.fineract.portfolio.group.domain.Group - org.apache.fineract.portfolio.client.domain.Client - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration - org.apache.fineract.portfolio.group.domain.GroupRole org.apache.fineract.portfolio.paymenttype.domain.PaymentType - org.apache.fineract.portfolio.group.domain.GroupLevel - org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent - org.apache.fineract.organisation.office.domain.Office - org.apache.fineract.organisation.holiday.domain.Holiday - org.apache.fineract.infrastructure.cache.domain.PlatformCache - org.apache.fineract.infrastructure.codes.domain.Code - org.apache.fineract.infrastructure.businessdate.domain.BusinessDate - org.apache.fineract.infrastructure.codes.domain.CodeValue - + org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail + org.apache.fineract.portfolio.tax.domain.TaxGroup + org.apache.fineract.portfolio.tax.domain.TaxGroupMappings + org.apache.fineract.portfolio.tax.domain.TaxComponent + org.apache.fineract.portfolio.tax.domain.TaxComponentHistory + org.apache.fineract.portfolio.floatingrates.domain.FloatingRate + org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod + org.apache.fineract.portfolio.calendar.domain.Calendar + org.apache.fineract.portfolio.calendar.domain.CalendarHistory + org.apache.fineract.portfolio.calendar.domain.CalendarInstance + org.apache.fineract.useradministration.domain.AppUser + org.apache.fineract.useradministration.domain.Role + org.apache.fineract.useradministration.domain.Permission + org.apache.fineract.useradministration.domain.AppUserClientMapping false