Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to pass rollback parameters to gradle task #25

Closed
Bahar13 opened this issue Jun 29, 2017 · 2 comments
Closed

unable to pass rollback parameters to gradle task #25

Bahar13 opened this issue Jun 29, 2017 · 2 comments

Comments

@Bahar13
Copy link

Bahar13 commented Jun 29, 2017

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"

args "--changeLogFile=" + changeLogFile
args "--databaseChangeLogTableName=" + databaseChangeLogTableName
args "--databaseChangeLogLockTableName=" + databaseChangeLogLockTableName
args "--username=" + username
args "--password=" + password
args "--url=" + url
args "--driver=" + driverClassName
args "rollbackCount"

}

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.

@newnewcoder
Copy link

How about use this plugin instead of defining a gradle task by JavaExec?

@stevesaliman
Copy link
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants