Michael Vorburger
2019-07-09 09:52:37 +02:00
committed by Michael Vorburger.ch
parent d22ed87276
commit 84d57dbe5b
3 changed files with 24 additions and 23 deletions
+21 -16
View File
@@ -77,11 +77,10 @@ repositories {
// mavenLocal() // useful for local dev using MariaDB4j SNAPSHOTs (not needed for real-world non-SNAPHOT builds)
}
openjpa {
files = fileTree(sourceSets.main.output.classesDir).matching {
files = fileTree(sourceSets.main.output.classesDirs.filter {
include '**/AbstractPersistableCustom.class'
include '**/domain/*.class'
}
})
enforcePropertyRestrictions = true
}
@@ -335,8 +334,8 @@ tomcatRunWar {
}
/* http://stackoverflow.com/questions/19653311/jpa-repository-works-in-idea-and-production-but-not-in-gradle */
sourceSets.main.output.resourcesDir = sourceSets.main.output.classesDir
sourceSets.test.output.resourcesDir = sourceSets.test.output.classesDir
sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir
sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir
/* Exclude maria db and embedded tomcat related files for non dev builds */
if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) {
@@ -375,7 +374,7 @@ task integrationTest(type:Test){
tomcatRunWar.daemon = true
tomcatRunWar.execute()
}
testClassesDir = project.sourceSets.integrationTest.output.classesDir
testClassesDirs = project.sourceSets.integrationTest.output.classesDirs
classpath = project.sourceSets.integrationTest.runtimeClasspath
}
@@ -397,21 +396,27 @@ configurations.driver.each {File file ->
loader.addURL(file.toURL())
}
task createDB<<{
task createDB {
description= "Creates the Database. Needs database name to be passed (like: -PdbName=someDBname)"
def sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute( 'create database '+"`$dbName`" )
doLast {
sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute( 'create database '+"`$dbName`" )
}
}
task dropDB<<{
task dropDB {
description= "Drops the specified database. The database name has to be passed (like: -PdbName=someDBname)"
def sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute( 'DROP DATABASE '+"`$dbName`")
doLast {
sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute( 'DROP DATABASE '+"`$dbName`")
}
}
task setBlankPassword<<{
def sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute('USE `mifosplatform-tenants`')
sql.execute('UPDATE mifosplatform-tenants.tenants SET schema_server = \'localhost\', schema_server_port = \'3306\', schema_username = \'mifos\', schema_password = \'mysql\' WHERE id=1;')
task setBlankPassword {
doLast {
sql = Sql.newInstance( 'jdbc:mysql:thin://localhost:3306/', mysqlUser, mysqlPassword, 'org.drizzle.jdbc.DrizzleDriver' )
sql.execute('USE `mifosplatform-tenants`')
sql.execute('UPDATE mifosplatform-tenants.tenants SET schema_server = \'localhost\', schema_server_port = \'3306\', schema_username = \'mifos\', schema_password = \'mysql\' WHERE id=1;')
}
}
+1 -5
View File
@@ -27,10 +27,6 @@ dependencies {
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat:${springBootVersion}")
providedCompile(
// [group: 'javax.servlet', name: 'servlet-api', version: '2.5'],
)
compile(
// [group: 'ch.vorburger.mariaDB4j', name: 'mariaDB4j', version: '2.1.3'],
@@ -39,7 +35,7 @@ dependencies {
[group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: springBootVersion],
//[group: 'org.eclipse.persistence', name: 'javax.persistence', version: '2.0.0'],
[group: 'org.springframework', name: 'spring-context-support', version: springVersion],
[group: 'org.springframework.security.oauth', name: 'spring-security-oauth2', version: springOauthVersion],
[group: 'org.apache.openjpa', name:'openjpa-all', version: openJPAVersion],
+2 -2
View File
@@ -1,6 +1,6 @@
#Fri Jan 29 13:04:36 IST 2016
#Wed Feb 13 23:18:32 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip