Passing parameter and value to Gradle liquibase plugin

坚强是说给别人听的谎言 提交于 2020-05-10 06:31:13

问题


I'm using gradle liquibase plugin (https://github.com/liquibase/liquibase-gradle-plugin) but I don't understand how to pass parameters and values.

I want build a rollback based on tag and date but I'm only able to rollback on a tag with this command:

gradle rollback -DliquibaseTag=value 

I don't understand how I should pass data, tag or count.

My grade.build is very simple:

apply plugin: 'liquibase'

buildscript {

    repositories {

          mavenLocal()

      mavenCentral()

    }

    dependencies {

      classpath 'org.liquibase:liquibase-gradle-plugin:1.1.0'

      classpath 'com.h2database:h2:1.3.160'
    }
  }

liquibase {

    activities {

      main {

        changeLogFile 'changelog.xml'

        url 'jdbc:h2:db/liquibase_workshop'

        username 'sa'

        password ''
      } 

    }   
runList = 'main'

}

回答1:


It looks like the syntax may be a little different than documented. Instead try something like:

gradle rollbackCount -PliquibaseCommandValue=1



来源:https://stackoverflow.com/questions/33620287/passing-parameter-and-value-to-gradle-liquibase-plugin

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!