Git Product home page Git Product logo

Comments (4)

stevesaliman avatar stevesaliman commented on August 29, 2024

I think solving the changelog parameter issue will take care of your sqlFile issue. Assuming that you have a property called database defined in your Gradle build, you should be able to simply use changeLogParameters([ dbms: database]) to pass the value of the build property into Liquibase.

from liquibase-gradle-plugin.

cmoisei avatar cmoisei commented on August 29, 2024

In the given example, the database was a gradle property via the gradles.properties.
However i have failed to mention that I did try the route you pointed out too.

I don't think the params are fed into the changeSet {}

I even tried something like this

liquibase
{
  activities
  {
    main
    {
      url databaseUrl
      username databaseUsername
      password databasePassword
      changeLogFile "changelog/changelog-master.groovy"
      classpath "${projectDir}/src/db"
      changeLogParameters([ dbms: 'test'])
    }
    data {
      url databaseUrl
      username databaseUsername
      password databasePassword
      changeLogFile "convert/data/changelog-master.groovy"
      classpath "${projectDir}/src/db"
      changeLogParameters([ dbms:  'test' ])
    }
  }
  runList = project.getRunList().join(',')
  console "Liquibase: ${runList}"
}
  changeSet(author: 'xxx, id: 'tagDatabase') {
    comment "Main"
    System.out.println("++++++++++++++++++++++++++++++++++++++=>${dbms}" )

Same results.... Any idea how to debug this ?

SEVERE 12/4/18 10:39 AM: liquibase: No such property: dbms for class: org.liquibase.groovy.delegate.ChangeSetDelegate
groovy.lang.MissingPropertyException: No such property: dbms for class: org.liquibase.groovy.delegate.ChangeSetDelegate
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)
	at Script1$_run_closure1$_closure2.doCall(Script1.groovy:28)
	at Script1$_run_closure1$_closure2.doCall(Script1.groovy)

from liquibase-gradle-plugin.

stevesaliman avatar stevesaliman commented on August 29, 2024

I'm not sure what might be happening here. I tried passing changeLogParameters to Liquibase using the Liquibase Workshop project to test changeLogParameters, and the parameters seem to work fine.

I think the first thing we need to figure out is whether or not the parameters are getting passed to Liquibase. If you run Gradle with the --debug flag, the plugin will tell you the exact Liquibase command it is running - look for the line that starts Running 'liquibase. At the end of the command there should be some -D options. Do they have the right values?

from liquibase-gradle-plugin.

stevesaliman avatar stevesaliman commented on August 29, 2024

Closed for inactivity

from liquibase-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.