Revert "FINERACT-2181: Some tweaks in the gradle build to ensure correct task processing"

This reverts commit 11cecb0d45.
This commit is contained in:
Arnold Galovics
2025-06-20 21:53:28 +02:00
committed by Arnold Gálovics
parent d46ab4e73e
commit 1ebfad230c
38 changed files with 810 additions and 1909 deletions
+4
View File
@@ -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 {
+1
View File
@@ -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 ->
+14 -45
View File
@@ -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
)
}
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<persistence version="2.0"
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<!-- Fineract Charge module -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
</properties>
</persistence-unit>
</persistence>
+5 -1
View File
@@ -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 }
}
+14 -47
View File
@@ -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
)
}
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<persistence version="2.0"
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.office.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<!-- Fineract core module -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
</properties>
</persistence-unit>
</persistence>
@@ -1,100 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<persistence version="2.0"
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Accounting Module Entities -->
<class>org.apache.fineract.accounting.closure.domain.GLClosure</class>
<class>org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount</class>
<class>org.apache.fineract.accounting.glaccount.domain.TrialBalance</class>
<class>org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<!-- Charge Module Entities -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<!-- Branch Module Entities -->
<class>org.apache.fineract.organisation.teller.domain.CashierTransaction</class>
<class>org.apache.fineract.organisation.teller.domain.Teller</class>
<class>org.apache.fineract.organisation.teller.domain.Cashier</class>
<class>org.apache.fineract.organisation.teller.domain.TellerTransaction</class>
<!-- Tax Module Entities -->
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
</properties>
</persistence-unit>
</persistence>
+14 -47
View File
@@ -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
)
}
@@ -22,57 +22,53 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.office.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Tax Module Entities -->
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<!-- Fineract Tax module -->
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
@@ -1,93 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<persistence version="2.0"
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Accounting Module Entities -->
<class>org.apache.fineract.accounting.closure.domain.GLClosure</class>
<class>org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount</class>
<class>org.apache.fineract.accounting.glaccount.domain.TrialBalance</class>
<class>org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<!-- Tax Module Entities -->
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<!-- Charge Module Entities -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
</properties>
</persistence-unit>
</persistence>
-56
View File
@@ -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
)
}
-3
View File
@@ -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'
@@ -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;
@@ -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;
@@ -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;
+16 -49
View File
@@ -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
)
}
@@ -22,19 +22,13 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Command Module Entities -->
<class>org.apache.fineract.command.persistence.domain.CommandEntity</class>
<class>org.apache.fineract.command.persistence.converter.JsonAttributeConverter</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
+14 -47
View File
@@ -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
)
}
@@ -22,51 +22,49 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.office.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<!-- Fineract Charge module -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
+14 -47
View File
@@ -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
)
}
@@ -22,68 +22,61 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Accounting Module Entities -->
<class>org.apache.fineract.accounting.closure.domain.GLClosure</class>
<class>org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount</class>
<class>org.apache.fineract.accounting.glaccount.domain.TrialBalance</class>
<class>org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<!-- Charge Module Entities -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<!-- Loan Module Entities -->
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<!-- Fineract loan module -->
<class>org.apache.fineract.portfolio.collateral.domain.LoanCollateral</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucketMappings</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyTagHistory</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanInstallmentDelinquencyTag</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.GroupLoanIndividualMonitoringAccount</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.Loan</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCharge</class>
@@ -100,7 +93,6 @@
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanRescheduleRequestToTermVariationMapping</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusChangeHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTopupDetails</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheCharge</class>
@@ -108,9 +100,6 @@
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionToRepaymentScheduleMapping</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter</class>
<class>org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanRepaymentScheduleHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProduct</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductBorrowerCycleVariations</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductConfigurableAttributes</class>
@@ -120,25 +109,20 @@
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductInterestRecalculationDetails</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductVariableInstallmentConfig</class>
<class>org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.DueType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.FutureInstallmentAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTransactionType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.CreditAllocationTransactionType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.SupportedInterestRefundTypesListConverter</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain</class>
<class>org.apache.fineract.portfolio.collateral.domain.LoanCollateral</class>
<!-- Tax Module Entities -->
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<!-- Rates Module Entities -->
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter</class>
<class>org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest</class>
<class>org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
+19 -43
View File
@@ -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 }
}
@@ -22,69 +22,56 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Accounting Module Entities -->
<class>org.apache.fineract.accounting.closure.domain.GLClosure</class>
<class>org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount</class>
<class>org.apache.fineract.accounting.glaccount.domain.TrialBalance</class>
<class>org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<!-- Charge Module Entities -->
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<!-- Fineract Charge module -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<!-- Tax Module Entities -->
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<!-- Fineract Tax module -->
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
+14 -47
View File
@@ -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
)
}
@@ -22,68 +22,57 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.office.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Accounting Module Entities -->
<class>org.apache.fineract.accounting.closure.domain.GLClosure</class>
<class>org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount</class>
<class>org.apache.fineract.accounting.glaccount.domain.TrialBalance</class>
<class>org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<!-- Charge Module Entities -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<!-- Loan Module Entities -->
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<!-- Fineract loan module -->
<class>org.apache.fineract.portfolio.collateral.domain.LoanCollateral</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucketMappings</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyTagHistory</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanInstallmentDelinquencyTag</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.GroupLoanIndividualMonitoringAccount</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.Loan</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCharge</class>
@@ -100,7 +89,6 @@
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanRescheduleRequestToTermVariationMapping</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusChangeHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTopupDetails</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheCharge</class>
@@ -108,9 +96,6 @@
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionToRepaymentScheduleMapping</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter</class>
<class>org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanRepaymentScheduleHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProduct</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductBorrowerCycleVariations</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductConfigurableAttributes</class>
@@ -120,27 +105,35 @@
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductInterestRecalculationDetails</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductVariableInstallmentConfig</class>
<class>org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.DueType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.FutureInstallmentAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTransactionType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.CreditAllocationTransactionType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.SupportedInterestRefundTypesListConverter</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain</class>
<class>org.apache.fineract.portfolio.collateral.domain.LoanCollateral</class>
<!-- Tax Module Entities -->
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter</class>
<class>org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest</class>
<class>org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter</class>
<!-- Fineract Charge module -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<!-- Fineract Accounting module -->
<class>org.apache.fineract.accounting.closure.domain.GLClosure</class>
<class>org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount</class>
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<!-- Fineract Tax module -->
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<!-- Rates Module Entities -->
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<!-- Progressive Loan Module Entities -->
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeBalance</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.ProgressiveLoanModel</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
+20 -166
View File
@@ -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
}
@@ -22,73 +22,59 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Accounting Module Entities -->
<class>org.apache.fineract.accounting.closure.domain.GLClosure</class>
<class>org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount</class>
<class>org.apache.fineract.accounting.glaccount.domain.TrialBalance</class>
<class>org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<!-- Charge Module Entities -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<!-- Investor Module Entities -->
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<!-- Fineract investor module -->
<class>org.apache.fineract.investor.domain.ExternalAssetOwner</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerLoanProductAttributes</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerJournalEntryMapping</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerTransfer</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerTransferDetails</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerTransferJournalEntryMapping</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerTransferLoanMapping</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerJournalEntryMapping</class>
<!-- Loan Module Entities -->
<!-- Fineract loan module -->
<class>org.apache.fineract.portfolio.collateral.domain.LoanCollateral</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucketMappings</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyTagHistory</class>
@@ -99,6 +85,7 @@
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanChargePaidBy</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCollateralManagement</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanDisbursementDetails</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanInstallmentCharge</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails</class>
@@ -109,7 +96,6 @@
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanRescheduleRequestToTermVariationMapping</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusChangeHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTopupDetails</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheCharge</class>
@@ -118,8 +104,13 @@
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionToRepaymentScheduleMapping</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter</class>
<class>org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanRepaymentScheduleHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter</class>
<class>org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.CreditAllocationTransactionType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.DueType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.FutureInstallmentAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProduct</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductBorrowerCycleVariations</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductConfigurableAttributes</class>
@@ -129,24 +120,48 @@
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductInterestRecalculationDetails</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductVariableInstallmentConfig</class>
<class>org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTransactionType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationType</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.SupportedInterestRefundTypesListConverter</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain</class>
<class>org.apache.fineract.portfolio.collateral.domain.LoanCollateral</class>
<!-- Tax Module Entities -->
<class>org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter</class>
<!-- Fineract Savings module -->
<class>org.apache.fineract.interoperation.domain.InteropIdentifier</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestIncentives</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestRateChart</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestRateChartSlab</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentives</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChart</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChartSlabs</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountOnHoldTransaction</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountTermAndPreClosure</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositProductRecurringDetail</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositProductTermAndPreClosure</class>
<class>org.apache.fineract.portfolio.savings.domain.FixedDepositAccount</class>
<class>org.apache.fineract.portfolio.savings.domain.FixedDepositProduct</class>
<class>org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring</class>
<class>org.apache.fineract.portfolio.savings.domain.RecurringDepositAccount</class>
<class>org.apache.fineract.portfolio.savings.domain.RecurringDepositProduct</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccount</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountCharge</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountChargePaidBy</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountTransaction</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountTransactionTaxDetails</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsOfficerAssignmentHistory</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsProduct</class>
<!-- Fineract Accounting module -->
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<!-- Fineract Document module -->
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Document</class>
<!-- Fineract Charge module -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<!-- Fineract Tax module -->
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<!-- Rates Module Entities -->
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
@@ -1,367 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<persistence version="2.0"
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Accounting Module Entities -->
<class>org.apache.fineract.accounting.closure.domain.GLClosure</class>
<class>org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount</class>
<class>org.apache.fineract.accounting.glaccount.domain.TrialBalance</class>
<class>org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<!-- Credit Bureau Module Entities -->
<class>org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken</class>
<class>org.apache.fineract.infrastructure.creditbureau.domain.CreditReport</class>
<class>org.apache.fineract.infrastructure.creditbureau.domain.CreditBureau</class>
<class>org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauLoanProductMapping</class>
<class>org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauConfiguration</class>
<class>org.apache.fineract.infrastructure.creditbureau.domain.OrganisationCreditBureau</class>
<!-- Configuration Module Entities -->
<class>org.apache.fineract.infrastructure.configuration.domain.ExternalService</class>
<class>org.apache.fineract.infrastructure.configuration.domain.GlobalConfigurationProperty</class>
<class>org.apache.fineract.infrastructure.configuration.domain.ExternalServicesProperties</class>
<!-- Bulk Import Module Entities -->
<class>org.apache.fineract.infrastructure.bulkimport.domain.ImportDocument</class>
<!-- Survey Module Entities -->
<class>org.apache.fineract.infrastructure.survey.domain.Likelihood</class>
<!-- Entity Access Module Entities -->
<class>org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityRelation</class>
<class>org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityToEntityMapping</class>
<class>org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityAccess</class>
<!-- SMS Module Entities -->
<class>org.apache.fineract.infrastructure.sms.domain.SmsMessage</class>
<class>org.apache.fineract.infrastructure.campaigns.sms.domain.SmsCampaign</class>
<!-- Security Module Entities -->
<class>org.apache.fineract.infrastructure.security.domain.TFAccessToken</class>
<class>org.apache.fineract.infrastructure.security.domain.TwoFactorConfiguration</class>
<!-- Email Campaign Module Entities -->
<class>org.apache.fineract.infrastructure.campaigns.email.domain.EmailCampaign</class>
<class>org.apache.fineract.infrastructure.campaigns.email.domain.EmailConfiguration</class>
<class>org.apache.fineract.infrastructure.campaigns.email.domain.EmailMessage</class>
<!-- Account Number Format Module Entities -->
<class>org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormat</class>
<!-- Client Module Entities -->
<class>org.apache.fineract.portfolio.client.domain.ClientFamilyMembers</class>
<class>org.apache.fineract.portfolio.client.domain.ClientNonPerson</class>
<class>org.apache.fineract.portfolio.client.domain.ClientTransferDetails</class>
<class>org.apache.fineract.portfolio.client.domain.ClientAddress</class>
<class>org.apache.fineract.portfolio.client.domain.ClientCharge</class>
<class>org.apache.fineract.portfolio.client.domain.ClientTransaction</class>
<class>org.apache.fineract.portfolio.client.domain.ClientChargePaidBy</class>
<!-- Meeting Module Entities -->
<class>org.apache.fineract.portfolio.meeting.domain.Meeting</class>
<class>org.apache.fineract.portfolio.meeting.attendance.domain.ClientAttendance</class>
<!-- Hooks Module Entities -->
<class>org.apache.fineract.infrastructure.hooks.domain.Hook</class>
<class>org.apache.fineract.infrastructure.hooks.domain.HookResource</class>
<class>org.apache.fineract.infrastructure.hooks.domain.HookTemplate</class>
<class>org.apache.fineract.infrastructure.hooks.domain.Schema</class>
<class>org.apache.fineract.infrastructure.hooks.domain.HookConfiguration</class>
<!-- Address Module Entities -->
<class>org.apache.fineract.portfolio.address.domain.FieldConfiguration</class>
<class>org.apache.fineract.portfolio.address.domain.Address</class>
<!-- Entity Access Module Entities -->
<class>org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityRelation</class>
<class>org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityToEntityMapping</class>
<class>org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityAccess</class>
<!-- Self Service Module Entities -->
<class>org.apache.fineract.portfolio.self.account.domain.SelfBeneficiariesTPT</class>
<class>org.apache.fineract.portfolio.self.device.domain.DeviceRegistration</class>
<class>org.apache.fineract.portfolio.self.pockets.domain.Pocket</class>
<class>org.apache.fineract.portfolio.self.pockets.domain.PocketAccountMapping</class>
<class>org.apache.fineract.portfolio.self.registration.domain.SelfServiceRegistration</class>
<!-- Command Module Entities -->
<class>org.apache.fineract.command.persistence.domain.CommandEntity</class>
<class>org.apache.fineract.command.persistence.converter.JsonAttributeConverter</class>
<!-- Charge Module Entities -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<!-- Branch Module Entities -->
<class>org.apache.fineract.organisation.teller.domain.CashierTransaction</class>
<class>org.apache.fineract.organisation.teller.domain.Teller</class>
<class>org.apache.fineract.organisation.teller.domain.Cashier</class>
<class>org.apache.fineract.organisation.teller.domain.TellerTransaction</class>
<!-- Investor Module Entities -->
<class>org.apache.fineract.investor.domain.ExternalAssetOwner</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerLoanProductAttributes</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerTransfer</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerTransferDetails</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerTransferJournalEntryMapping</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerTransferLoanMapping</class>
<class>org.apache.fineract.investor.domain.ExternalAssetOwnerJournalEntryMapping</class>
<!-- Loan Module Entities -->
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucketMappings</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyTagHistory</class>
<class>org.apache.fineract.portfolio.delinquency.domain.LoanInstallmentDelinquencyTag</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.GroupLoanIndividualMonitoringAccount</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.Loan</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCharge</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanChargePaidBy</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCollateralManagement</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCreditAllocationRule</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanDisbursementDetails</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanInstallmentCharge</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalculationDetails</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanOfficerAssignmentHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanOverdueInstallmentCharge</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanPaymentAllocationRule</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanRescheduleRequestToTermVariationMapping</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusChangeHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanStatusConverter</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTopupDetails</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheCharge</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTrancheDisbursementCharge</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionToRepaymentScheduleMapping</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter</class>
<class>org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanRepaymentScheduleHistory</class>
<class>org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProduct</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductBorrowerCycleVariations</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductConfigurableAttributes</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductCreditAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductFloatingRates</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductGuaranteeDetails</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductInterestRecalculationDetails</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.LoanProductVariableInstallmentConfig</class>
<class>org.apache.fineract.portfolio.repaymentwithpostdatedchecks.domain.PostDatedChecks</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.SupportedInterestRefundTypesListConverter</class>
<class>org.apache.fineract.portfolio.loanproduct.domain.AllocationTypeListConverter</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement</class>
<class>org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain</class>
<class>org.apache.fineract.portfolio.collateral.domain.LoanCollateral</class>
<!-- Document Module Entities -->
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Document</class>
<!-- Tax Module Entities -->
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<!-- Rates Module Entities -->
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<!-- Savings Module Entities -->
<class>org.apache.fineract.interoperation.domain.InteropIdentifier</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestIncentives</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestRateChart</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestRateChartSlab</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentive</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentives</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChart</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChartSlabs</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountOnHoldTransaction</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountTermAndPreClosure</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositProductRecurringDetail</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositProductTermAndPreClosure</class>
<class>org.apache.fineract.portfolio.savings.domain.FixedDepositProduct</class>
<class>org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring</class>
<class>org.apache.fineract.portfolio.savings.domain.RecurringDepositProduct</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccount</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountCharge</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountChargePaidBy</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountTransaction</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountTransactionTaxDetails</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsOfficerAssignmentHistory</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsProduct</class>
<!-- Progressive Loan Module Entities -->
<class>org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeBalance</class>
<class>org.apache.fineract.portfolio.loanaccount.domain.ProgressiveLoanModel</class>
<!-- Account Module Entities -->
<class>org.apache.fineract.portfolio.account.domain.AccountAssociations</class>
<class>org.apache.fineract.portfolio.account.domain.AccountTransferDetails</class>
<class>org.apache.fineract.portfolio.account.domain.AccountTransferStandingInstruction</class>
<class>org.apache.fineract.portfolio.account.domain.AccountTransferTransaction</class>
<!-- Provider Module Entities -->
<!-- Notification -->
<class>org.apache.fineract.notification.domain.NotificationMapper</class>
<class>org.apache.fineract.notification.domain.Notification</class>
<!-- AdHocQuery -->
<class>org.apache.fineract.adhocquery.domain.AdHoc</class>
<!-- Mix -->
<class>org.apache.fineract.mix.domain.MixTaxonomyMapping</class>
<!-- COB (Chunk of Business) -->
<class>org.apache.fineract.cob.domain.LoanAccountLock</class>
<class>org.apache.fineract.cob.domain.BatchBusinessStep</class>
<!-- Template -->
<class>org.apache.fineract.template.domain.Template</class>
<class>org.apache.fineract.template.domain.TemplateMapper</class>
<!-- Accounting/Provisioning -->
<class>org.apache.fineract.accounting.provisioning.domain.LoanProductProvisioningEntry</class>
<class>org.apache.fineract.accounting.provisioning.domain.ProvisioningEntry</class>
<!-- User Administration -->
<class>org.apache.fineract.useradministration.domain.AppUserPreviousPassword</class>
<class>org.apache.fineract.useradministration.domain.PasswordValidationPolicy</class>
<!-- SPM (Smart Pilot Module) -->
<class>org.apache.fineract.spm.domain.Question</class>
<class>org.apache.fineract.spm.domain.LookupTable</class>
<class>org.apache.fineract.spm.domain.Component</class>
<class>org.apache.fineract.spm.domain.Scorecard</class>
<class>org.apache.fineract.spm.domain.Survey</class>
<class>org.apache.fineract.spm.domain.Response</class>
<!-- Product Mix -->
<class>org.apache.fineract.portfolio.loanproduct.productmix.domain.ProductMix</class>
<!-- Provisioning -->
<class>org.apache.fineract.organisation.provisioning.domain.ProvisioningCriteria</class>
<class>org.apache.fineract.organisation.provisioning.domain.LoanProductProvisionCriteria</class>
<class>org.apache.fineract.organisation.provisioning.domain.ProvisioningCriteriaDefinition</class>
<class>org.apache.fineract.organisation.provisioning.domain.ProvisioningCategory</class>
<!-- Office -->
<class>org.apache.fineract.organisation.office.domain.OfficeTransaction</class>
<!-- Self Registration -->
<class>org.apache.fineract.portfolio.self.registration.domain.SelfServiceRegistration</class>
<!-- Note -->
<class>org.apache.fineract.portfolio.note.domain.Note</class>
<!-- Savings -->
<class>org.apache.fineract.portfolio.savings.domain.RecurringDepositScheduleInstallment</class>
<class>org.apache.fineract.portfolio.savings.domain.FixedDepositAccount</class>
<class>org.apache.fineract.portfolio.savings.domain.RecurringDepositAccount</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountRecurringDetail</class>
<!-- Share Products -->
<class>org.apache.fineract.portfolio.shareproducts.domain.ShareProductDividendPayOutDetails</class>
<class>org.apache.fineract.portfolio.shareproducts.domain.ShareProduct</class>
<class>org.apache.fineract.portfolio.shareproducts.domain.ShareProductMarketPrice</class>
<!-- Share Accounts -->
<class>org.apache.fineract.portfolio.shareaccounts.domain.ShareAccount</class>
<class>org.apache.fineract.portfolio.shareaccounts.domain.ShareAccountCharge</class>
<class>org.apache.fineract.portfolio.shareaccounts.domain.ShareAccountChargePaidBy</class>
<class>org.apache.fineract.portfolio.shareaccounts.domain.ShareAccountDividendDetails</class>
<class>org.apache.fineract.portfolio.shareaccounts.domain.ShareAccountTransaction</class>
<!-- Report Mailing Job -->
<class>org.apache.fineract.infrastructure.reportmailingjob.domain.ReportMailingJob</class>
<class>org.apache.fineract.infrastructure.reportmailingjob.domain.ReportMailingJobConfiguration</class>
<class>org.apache.fineract.infrastructure.reportmailingjob.domain.ReportMailingJobRunHistory</class>
<!-- Data Queries -->
<class>org.apache.fineract.infrastructure.dataqueries.domain.RegisteredDatatable</class>
<class>org.apache.fineract.infrastructure.dataqueries.domain.Report</class>
<class>org.apache.fineract.infrastructure.dataqueries.domain.ReportParameterUsage</class>
<class>org.apache.fineract.infrastructure.dataqueries.domain.ReportParameter</class>
<class>org.apache.fineract.infrastructure.dataqueries.domain.EntityDatatableChecks</class>
<!-- Guarantor -->
<class>org.apache.fineract.portfolio.loanaccount.guarantor.domain.GuarantorFundingDetails</class>
<class>org.apache.fineract.portfolio.loanaccount.guarantor.domain.GuarantorFundingTransaction</class>
<class>org.apache.fineract.portfolio.loanaccount.guarantor.domain.Guarantor</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
</properties>
</persistence-unit>
</persistence>
+14 -47
View File
@@ -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
)
}
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<persistence version="2.0"
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.office.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<!-- Fineract Charge module -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
</properties>
</persistence-unit>
</persistence>
+14 -47
View File
@@ -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
)
}
@@ -22,55 +22,52 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.office.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Rates Module Entities -->
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
+21 -56
View File
@@ -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
)
}
@@ -22,54 +22,50 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.office.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Document Module Entities -->
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Document</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<!-- Fineract Charge module -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<!-- Fineract Tax module -->
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
@@ -1,123 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<persistence version="2.0"
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<!-- Accounting Module Entities -->
<class>org.apache.fineract.accounting.closure.domain.GLClosure</class>
<class>org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount</class>
<class>org.apache.fineract.accounting.glaccount.domain.TrialBalance</class>
<class>org.apache.fineract.accounting.producttoaccountmapping.domain.ProductToGLAccountMapping</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingRule</class>
<class>org.apache.fineract.accounting.rule.domain.AccountingTagRule</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<!-- Tax Module Entities -->
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<!-- Rates Module Entities -->
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<!-- Savings Module Entities -->
<class>org.apache.fineract.interoperation.domain.InteropIdentifier</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestIncentives</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestRateChart</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestRateChartSlab</class>
<class>org.apache.fineract.portfolio.interestratechart.domain.InterestRateChartFields</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentive</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestIncentives</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChart</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountInterestRateChartSlabs</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountOnHoldTransaction</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositAccountTermAndPreClosure</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositProductRecurringDetail</class>
<class>org.apache.fineract.portfolio.savings.domain.DepositProductTermAndPreClosure</class>
<class>org.apache.fineract.portfolio.savings.domain.FixedDepositProduct</class>
<class>org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring</class>
<class>org.apache.fineract.portfolio.savings.domain.RecurringDepositProduct</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccount</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountCharge</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountChargePaidBy</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountTransaction</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsAccountTransactionTaxDetails</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsOfficerAssignmentHistory</class>
<class>org.apache.fineract.portfolio.savings.domain.SavingsProduct</class>
<!-- Charge Module Entities -->
<class>org.apache.fineract.portfolio.charge.domain.Charge</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />
</properties>
</persistence-unit>
</persistence>
+14 -47
View File
@@ -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
)
}
@@ -22,51 +22,52 @@
<persistence version="2.0"
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">
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">
<!-- This file is only used for static weaving, nothing more. -->
<!-- You can find the runtime configuration in the JPAConfig class -->
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<!-- Core Module Entities -->
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<class>org.apache.fineract.commands.domain.CommandSource</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<!-- Fineract core module -->
<class>org.apache.fineract.accounting.glaccount.domain.GLAccount</class>
<class>org.apache.fineract.organisation.monetary.domain.OrganisationCurrency</class>
<class>org.apache.fineract.accounting.journalentry.domain.JournalEntry</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom</class>
<class>org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.infrastructure.documentmanagement.domain.Image</class>
<class>org.apache.fineract.organisation.staff.domain.Staff</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.office.domain.OrganisationCurrency</class>
<class>org.apache.fineract.organisation.monetary.domain.ApplicationCurrency</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.organisation.workingdays.domain.WorkingDays</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.portfolio.client.domain.ClientIdentifier</class>
<class>org.apache.fineract.portfolio.rate.domain.Rate</class>
<class>org.apache.fineract.portfolio.fund.domain.Fund</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket</class>
<class>org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange</class>
<class>org.apache.fineract.portfolio.group.domain.StaffAssignmentHistory</class>
<class>org.apache.fineract.portfolio.group.domain.Group</class>
<class>org.apache.fineract.portfolio.client.domain.Client</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration</class>
<class>org.apache.fineract.portfolio.group.domain.GroupRole</class>
<class>org.apache.fineract.portfolio.paymenttype.domain.PaymentType</class>
<class>org.apache.fineract.portfolio.group.domain.GroupLevel</class>
<class>org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent</class>
<class>org.apache.fineract.organisation.office.domain.Office</class>
<class>org.apache.fineract.organisation.holiday.domain.Holiday</class>
<class>org.apache.fineract.infrastructure.cache.domain.PlatformCache</class>
<class>org.apache.fineract.infrastructure.codes.domain.Code</class>
<class>org.apache.fineract.infrastructure.businessdate.domain.BusinessDate</class>
<class>org.apache.fineract.infrastructure.codes.domain.CodeValue</class>
<class>org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroup</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxGroupMappings</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponent</class>
<class>org.apache.fineract.portfolio.tax.domain.TaxComponentHistory</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRate</class>
<class>org.apache.fineract.portfolio.floatingrates.domain.FloatingRatePeriod</class>
<class>org.apache.fineract.portfolio.calendar.domain.Calendar</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarHistory</class>
<class>org.apache.fineract.portfolio.calendar.domain.CalendarInstance</class>
<class>org.apache.fineract.useradministration.domain.AppUser</class>
<class>org.apache.fineract.useradministration.domain.Role</class>
<class>org.apache.fineract.useradministration.domain.Permission</class>
<class>org.apache.fineract.useradministration.domain.AppUserClientMapping</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.weaving" value="static" />