In our project we are using Liquibase gradle plugin. Recently, we updated ojdbc8 plugin to version 18.3.0.0. Unfortunately, it caused our Liquibase task to fail with ORA-01882: timezone region not found. I found some solutions for this error (e.g. there: ORA-01882: timezone region not found), but I have no idea how I could add this -Duser.timezone or -Doracle.jdbc.timezoneAsRegion property to gradle task. I tried different approaches, but with no success.
This is how some crucial parts of our build.gradle look like:
liquibase {
activities {
oracle {
changeLogFile "$liquibasePath/db.changelog-master.xml"
driver liquibaseProps['oracle.driver']
url "jdbc:oracle:thin:@${liquibaseProps['oracle.ip.port']}:${liquibaseProps['oracle.schema']}"
username liquibaseProps['oracle.username']
password liquibaseProps['oracle.password']
outputDefaultSchema false
outputDefaultCatalog false
}
}
}
def generate(taskName, taskDescription, generateCommand) {
project.task(taskName, type: LiquibaseTask) {
group = 'Liquibase'
description = taskDescription
inputs.property('databases', getRunList())
inputs.dir liquibasePath
outputs.dir sqlScriptsPath
doLast {
new LiquibaseSqlCleanupTask(sqlScriptsPath).execute()
}
}
}