FINERACT-982 - Completely ditch use of Drizzle JDBC Driver after all
This commit is contained in:
committed by
Petri Tuomola
parent
7b4fcb9549
commit
03a8a9858d
@@ -196,15 +196,8 @@ eclipse
|
||||
sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir
|
||||
sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir
|
||||
|
||||
/* Exclude maria db related files for non dev builds */
|
||||
if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
exclude '**/ServerWithMariaDB*'
|
||||
exclude '**/MariaDB4j*'
|
||||
}
|
||||
}
|
||||
test {
|
||||
java {
|
||||
exclude '**/core/boot/tests/**'
|
||||
@@ -224,7 +217,7 @@ configurations {
|
||||
driver
|
||||
}
|
||||
dependencies {
|
||||
driver 'org.drizzle.jdbc:drizzle-jdbc:1.4'
|
||||
driver 'org.mariadb.jdbc:mariadb-java-client:2.7.3'
|
||||
}
|
||||
|
||||
URLClassLoader loader = GroovyObject.class.classLoader
|
||||
@@ -235,7 +228,7 @@ configurations.driver.each {File file ->
|
||||
task createDB {
|
||||
description= "Creates the Database. Needs database name to be passed (like: -PdbName=someDBname)"
|
||||
doLast {
|
||||
def sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
|
||||
def sql = Sql.newInstance( 'jdbc:mariadb://localhost:3306/', mysqlUser, mysqlPassword, 'org.mariadb.jdbc.Driver' )
|
||||
sql.execute( 'create database '+"`$dbName`" )
|
||||
}
|
||||
}
|
||||
@@ -243,13 +236,13 @@ task createDB {
|
||||
task dropDB {
|
||||
description= "Drops the specified database. The database name has to be passed (like: -PdbName=someDBname)"
|
||||
doLast {
|
||||
def sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
|
||||
def sql = Sql.newInstance( 'jdbc:mariadb://localhost:3306/', mysqlUser, mysqlPassword, 'org.mariadb.jdbc.Driver' )
|
||||
sql.execute( 'DROP DATABASE '+"`$dbName`")
|
||||
}
|
||||
}
|
||||
task setBlankPassword {
|
||||
doLast {
|
||||
def sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
|
||||
def sql = Sql.newInstance( 'jdbc:mariadb://localhost:3306/', mysqlUser, mysqlPassword, 'org.mariadb.jdbc.Driver' )
|
||||
sql.execute('USE `fineract_tenants`')
|
||||
sql.execute('UPDATE fineract_tenants.tenants SET schema_server = \'localhost\', schema_server_port = \'3306\', schema_username = \'mifos\', schema_password = \'mysql\' WHERE id=1;')
|
||||
}
|
||||
@@ -259,6 +252,10 @@ bootRun {
|
||||
jvmArgs = [
|
||||
"-Dspring.output.ansi.enabled=ALWAYS"
|
||||
]
|
||||
|
||||
dependencies {
|
||||
implementation 'org.mariadb.jdbc:mariadb-java-client:2.7.3'
|
||||
}
|
||||
}
|
||||
|
||||
springBoot {
|
||||
|
||||
Reference in New Issue
Block a user