Closed Bahar13 closed 7 years ago
How about use this plugin instead of defining a gradle task by JavaExec
?
@newnewcoder is correct. By defining your own task, you are not using the plugin. If your activities in the liquibase
block of your build.gradle are correct, you should be able to execute gradle rollbackCount -PliquibaseCommandValue=1
to rollback one change.
When trying to pass the rollback parameters to a gradle task as suggested using -PliquibaseCommandValue, the task fails to find the parameter.
The gradle task is defined as below:
task liquibaseRollback(type: JavaExec) { group = "liquibase" classpath sourceSets.main.runtimeClasspath classpath configurations.liquibase main = "liquibase.integration.commandline.Main"
}
and trying to add -PliquibaseCommandValue='1' as the last line of the code or running this task from command line, like: gradle liquibaseRollback -PliquibaseCommandValue='1' is not working.