This is an automated email from the ASF dual-hosted git repository.
vishwasbabu pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 0c2b1dc remove Flyway completely from Gradle build (fixes
FINERACT-765)
new 624015a Merge pull request #613 from
vorburger/FINERACT-765_rm-flyway-from-gradle
0c2b1dc is described below
commit 0c2b1dc6dc7c9b1a703f6c2e7926efe4c9fb4990
Author: Michael Vorburger.ch <[email protected]>
AuthorDate: Thu Jul 4 10:01:43 2019 +0200
remove Flyway completely from Gradle build (fixes FINERACT-765)
we (of course), still, but only, run it in-App at runtime boot
This is a clean-up which removes something we don't actually need.
Most importantly, it unblocks the Gradle upgrade in FINERACT-700,
where this doesn't work anymore anyway (and while there's a fix
making it work on one of my branches, it seems simpler to just
remove it).
---
Dockerfile | 1 -
fineract-provider/build.gradle | 111 -----------------------------------------
2 files changed, 112 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 73fb4b2..da4715a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -26,7 +26,6 @@ RUN mkdir fineract
COPY . fineract
WORKDIR fineract
-RUN sed -i 's/localhost/fineractmysql/' ./fineract-provider/build.gradle
RUN sed -i 's/localhost/fineractmysql/'
./fineract-provider/src/main/resources/sql/migrations/list_db/V1__mifos-platform-shared-tenants.sql
RUN ./gradlew clean war
RUN mv build/libs/fineract-provider.war /opt/bitnami/tomcat/webapps
diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index 5fa6e1e..2839e37 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -417,117 +417,6 @@ task setBlankPassword<<{
}
-apply plugin: 'flyway'
-buildscript {
- repositories {
- mavenCentral()
- }
-
- dependencies {
- classpath "org.flywaydb:flyway-gradle-plugin:3.0" // version upgraded
during Spring Boot & MariaDB4j work, as prev. used v0.2 didn't work well after
*.sql moved from fineract-db to fineract-provider/src/main/resources (new
version also has clearer errors, e.g. in case of missing DB)
-
- // NOT classpath 'org.drizzle.jdbc:drizzle-jdbc:1.3' as it is not
compatible with Flyway 3.1+ (only up to 3.0)
- // We require Flyway 3.1+ because =< 3.0 is not compatible with
current Gradle versions (only ancient ones we originally used to use).
- // Using LGPL ConnectorJ ()org.mariadb.jdbc:mariadb-java-client)
instead of the BSD licensed drizzle-jdbc *IS OK* at Apache.org,
- // as long as it's only used as a test library by developers at build
time, and not end-user distributed, and optional.
- // So it's OK here, but would not be as a default runtime dependency
and in the dist JAR/WAR.
- // see https://issues.apache.org/jira/browse/LEGAL-462
- // see https://issues.apache.org/jira/browse/FINERACT-761
- // see https://github.com/flyway/flyway/issues/2332
- // see https://github.com/krummas/DrizzleJDBC/issues/46
- // see https://github.com/apache/fineract/pull/525
- // see https://github.com/apache/fineract/pull/550
- classpath 'org.mariadb.jdbc:mariadb-java-client:2.4.1'
- }
-}
-
-
-flyway {
- url = "jdbc:mariadb://localhost:3306/mifostenant-default"
- driver = "org.mariadb.jdbc.Driver"
- user = mysqlUser
- password = mysqlPassword
-}
-
-task migrateTenantDB<<{
- description="Migrates a Tenant DB. Optionally can pass dbName. Defaults to
'mifostenant-default' (Example: -PdbName=someTenantDBname)"
-
- def filePath = "filesystem:$projectDir" +
'/src/main/resources/sql/migrations/core_db'
- def tenantDbName = 'mifostenant-default';
- if (rootProject.hasProperty("dbName")) {
- tenantDbName = rootProject.getProperty("dbName")
- }
-
- flyway.url= "jdbc:mariadb://localhost:3306/$tenantDbName"
- flyway.driver = "org.mariadb.jdbc.Driver"
- flyway.locations= [filePath]
- /**We use ${ as the prefix for strecthy reporting, do not want them to be
interpreted by Flyway**/
- flyway.placeholderPrefix = "\$\${"
- flywayMigrate.execute()
-}
-
-task showTenantDBInfo<<{
- description="Shows the migration info for a Tenant DB. Optionally can pass
dbName. Defaults to 'mifostenant-default' (Example: -PdbName=someTenantDBname)"
-
- def filePath = "filesystem:$projectDir" +
'/src/main/resources/sql/migrations/core_db'
- def tenantDbName = 'mifostenant-default';
- if (rootProject.hasProperty("dbName")) {
- tenantDbName = rootProject.getProperty("dbName")
- }
-
- flyway.url= "jdbc:mariadb://localhost:3306/$tenantDbName"
- flyway.driver = "org.mariadb.jdbc.Driver"
- flyway.locations= [filePath]
- flywayInfo.execute()
-}
-
-
-task migrateTenantListDB<<{
- description="Migrates a Tenant List DB. Optionally can pass dbName.
Defaults to 'mifosplatform-tenants' (Example: -PdbName=someDBname)"
-
- def filePath = "filesystem:$projectDir" +
'/src/main/resources/sql/migrations/list_db'
- def tenantsDbName = 'mifosplatform-tenants';
- if (rootProject.hasProperty("dbName")) {
- tenantsDbName = rootProject.getProperty("dbName")
- }
-
- flyway.url= "jdbc:mariadb://localhost:3306/$tenantsDbName"
- flyway.driver = "org.mariadb.jdbc.Driver"
- flyway.locations= [filePath]
-
- flywayMigrate.execute()
-}
-
-task showTenantListDBInfo<<{
- description="Shows the migration info for a List DB. Optionally can pass
dbName. Defaults to 'mifosplatform-tenants' (Example: -PdbName=someDBname)"
-
- def filePath = "filesystem:$projectDir" +
'/src/main/resources/sql/migrations/list_db'
- def tenantsDbName = 'mifosplatform-tenants';
- if (rootProject.hasProperty("dbName")) {
- tenantsDbName = rootProject.getProperty("dbName")
- }
-
- flyway.url= "jdbc:mariadb://localhost:3306/$tenantsDbName"
- flyway.driver = "org.mariadb.jdbc.Driver"
- flyway.locations= [filePath]
- flywayInfo.execute()
-}
-
-task repairTenantDB<<{
- description="repair migrate"
-
- def filePath = "filesystem:$projectDir" +
'/src/main/resources/sql/migrations/list_db'
- def tenantsDbName = 'mifosplatform-tenants';
- if (rootProject.hasProperty("dbName")) {
- tenantsDbName = rootProject.getProperty("dbName")
- }
-
- flyway.url= "jdbc:mariadb://localhost:3306/$tenantsDbName"
- flyway.driver = "org.mariadb.jdbc.Driver"
- flyway.locations= [filePath]
- flywayRepair.execute()
-}
-
/*
* Support publication of artifacts versioned by topic branch.
* CI builds supply `-P BRANCH_NAME=<TOPIC>` to gradle at build time.