Merge pull request #582 from apache/FINERACT-761_LEGAL-462_use-MariaDB-ConnectorJ-instead-Drizzle-in-build
use MariaDB ConnectorJ instead of Drizzle MySQL JDBC driver -only- during build for Flyway (fixes FINERACT-761)
This commit is contained in:
@@ -45,6 +45,16 @@ License
|
|||||||
|
|
||||||
This project is licensed under Apache License Version 2.0. See <https://github.com/apache/incubator-fineract/blob/develop/LICENSE.md> for referece.
|
This project is licensed under Apache License Version 2.0. See <https://github.com/apache/incubator-fineract/blob/develop/LICENSE.md> for referece.
|
||||||
|
|
||||||
|
The Connector/J JDBC Driver client library from MariaDB.org, which is licensed under the LGPL,
|
||||||
|
is used in development when running integration tests that use the Flyway library. That JDBC
|
||||||
|
driver is however not included in and distributed with the Fineract product, and is not
|
||||||
|
required to use the product.
|
||||||
|
If you are developer and object to using the LGPL licensed Connector/J JDBC driver,
|
||||||
|
simply do not run the integration tests that use the Flyway library.
|
||||||
|
As discussed in [LEGAL-462](https://issues.apache.org/jira/browse/LEGAL-462), this project therefore
|
||||||
|
complies with the [Apache Software Foundation third-party license policy](https://www.apache.org/legal/resolved.html).
|
||||||
|
|
||||||
|
|
||||||
Apache Fineract Platform API
|
Apache Fineract Platform API
|
||||||
============
|
============
|
||||||
|
|
||||||
|
|||||||
@@ -424,14 +424,26 @@ buildscript {
|
|||||||
|
|
||||||
dependencies {
|
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)
|
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)
|
||||||
classpath 'org.drizzle.jdbc:drizzle-jdbc:1.3'
|
|
||||||
|
// 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 {
|
flyway {
|
||||||
url = "jdbc:mysql:thin://localhost:3306/mifostenant-default"
|
url = "jdbc:mariadb://localhost:3306/mifostenant-default"
|
||||||
driver = "org.drizzle.jdbc.DrizzleDriver"
|
driver = "org.mariadb.jdbc.Driver"
|
||||||
user = mysqlUser
|
user = mysqlUser
|
||||||
password = mysqlPassword
|
password = mysqlPassword
|
||||||
}
|
}
|
||||||
@@ -445,8 +457,8 @@ task migrateTenantDB<<{
|
|||||||
tenantDbName = rootProject.getProperty("dbName")
|
tenantDbName = rootProject.getProperty("dbName")
|
||||||
}
|
}
|
||||||
|
|
||||||
flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantDbName"
|
flyway.url= "jdbc:mariadb://localhost:3306/$tenantDbName"
|
||||||
flyway.driver = "org.drizzle.jdbc.DrizzleDriver"
|
flyway.driver = "org.mariadb.jdbc.Driver"
|
||||||
flyway.locations= [filePath]
|
flyway.locations= [filePath]
|
||||||
/**We use ${ as the prefix for strecthy reporting, do not want them to be interpreted by Flyway**/
|
/**We use ${ as the prefix for strecthy reporting, do not want them to be interpreted by Flyway**/
|
||||||
flyway.placeholderPrefix = "\$\${"
|
flyway.placeholderPrefix = "\$\${"
|
||||||
@@ -462,8 +474,8 @@ task showTenantDBInfo<<{
|
|||||||
tenantDbName = rootProject.getProperty("dbName")
|
tenantDbName = rootProject.getProperty("dbName")
|
||||||
}
|
}
|
||||||
|
|
||||||
flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantDbName"
|
flyway.url= "jdbc:mariadb://localhost:3306/$tenantDbName"
|
||||||
flyway.driver = "org.drizzle.jdbc.DrizzleDriver"
|
flyway.driver = "org.mariadb.jdbc.Driver"
|
||||||
flyway.locations= [filePath]
|
flyway.locations= [filePath]
|
||||||
flywayInfo.execute()
|
flywayInfo.execute()
|
||||||
}
|
}
|
||||||
@@ -478,8 +490,8 @@ task migrateTenantListDB<<{
|
|||||||
tenantsDbName = rootProject.getProperty("dbName")
|
tenantsDbName = rootProject.getProperty("dbName")
|
||||||
}
|
}
|
||||||
|
|
||||||
flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantsDbName"
|
flyway.url= "jdbc:mariadb://localhost:3306/$tenantsDbName"
|
||||||
flyway.driver = "org.drizzle.jdbc.DrizzleDriver"
|
flyway.driver = "org.mariadb.jdbc.Driver"
|
||||||
flyway.locations= [filePath]
|
flyway.locations= [filePath]
|
||||||
|
|
||||||
flywayMigrate.execute()
|
flywayMigrate.execute()
|
||||||
@@ -494,8 +506,8 @@ task showTenantListDBInfo<<{
|
|||||||
tenantsDbName = rootProject.getProperty("dbName")
|
tenantsDbName = rootProject.getProperty("dbName")
|
||||||
}
|
}
|
||||||
|
|
||||||
flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantsDbName"
|
flyway.url= "jdbc:mariadb://localhost:3306/$tenantsDbName"
|
||||||
flyway.driver = "org.drizzle.jdbc.DrizzleDriver"
|
flyway.driver = "org.mariadb.jdbc.Driver"
|
||||||
flyway.locations= [filePath]
|
flyway.locations= [filePath]
|
||||||
flywayInfo.execute()
|
flywayInfo.execute()
|
||||||
}
|
}
|
||||||
@@ -509,8 +521,8 @@ task repairTenantDB<<{
|
|||||||
tenantsDbName = rootProject.getProperty("dbName")
|
tenantsDbName = rootProject.getProperty("dbName")
|
||||||
}
|
}
|
||||||
|
|
||||||
flyway.url= "jdbc:mysql:thin://localhost:3306/$tenantsDbName"
|
flyway.url= "jdbc:mariadb://localhost:3306/$tenantsDbName"
|
||||||
flyway.driver = "org.drizzle.jdbc.DrizzleDriver"
|
flyway.driver = "org.mariadb.jdbc.Driver"
|
||||||
flyway.locations= [filePath]
|
flyway.locations= [filePath]
|
||||||
flywayRepair.execute()
|
flywayRepair.execute()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user