We're using liquibase for database versioning and gradle as build tool. Currently we use
liquibase in version 2.0.5
com.augusttechgroup:gradle-liquibase-plugin:0.7
Due to a bug in liquibase which was fixed in 2.0.5 we're forced to go to version 3.0.x.
Unfortunately the gradle plugin doesn't work anymore.
:dropAll
Liquibase Update Failed: liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lliquibase/database/Database;
SEVERE 06.03.14 14:28:liquibase: liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lliquibase/database/Database;
java.lang.NoSuchMethodError: liquibase.integration.commandline.CommandLineUtils.createDatabaseObject(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lliquibase/database/Database;
at com.augusttechgroup.gradle.liquibase.Main.doMigration(Main.java:614)
Is there any alternative?
You could roll-your-own using JavaExec and not be dependable of the plugin. Example:
This way you are not dependable on the plugin and can use whichever version of Liquibase you'd like. Against is that you will not be able to write your changelogs in Groovy, but stick to liquibase standard xml.
For Liquibase 3, you'll need to use version
1.0.0-SNAPSHOT
of the Gradle Liquibase plugin. See the README on the plugin page for details.