Using gradle-liquibase plugin in our project with all dependencies resolved.
I have the following liquibase task as suggested by Gradle liquibase plugin:
liquibase {
activities {
main {
changeLogFile 'src/main/resources/db/dbchangelog-master.xml'
url 'jdbc:mysql://localhost:3306/test'
username 'XXX'
password 'XXX'
}
}
runList = 'main'
}
But encountered problems with the changeLogFile not being identified by liquibase though the logfile is in project classpath directory (src/main/resources/)
Error:
Caused by: liquibase.exception.ChangeLogParseException:
src/main/resources/dbchangelog/db.changelog-master.xml does not exist
Any help with regards to how should I resolve this classpath related issue?
Just add a classpath parameter where your src directory is
liquibase {
activities {
main {
changeLogFile 'src/main/resources/db/dbchangelog-master.xml'
url 'jdbc:mysql://localhost:3306/test'
username 'XXX'
password 'XXX'
classpath "$rootDir"
}
}
runList = 'main'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With