Git Product home page Git Product logo

Comments (3)

SButterfly avatar SButterfly commented on August 29, 2024

ok, I found this lines of code: https://github.com/liquibase/liquibase-gradle-plugin/blob/master/src/main/groovy/org/liquibase/gradle/LiquibaseTask.groovy

But, when I set parameters, system environment doesn't set:

       dev {
            changeLogFile "${projectDir}/src/sql/changelog.xml"
            url 'jdbc:oracle:thin:@dev.company.ru'
            username 'login'
            password 'pass'
            parameters=['oracle.net.tns_admin': "${projectDir}/src/sql"]
        }

I guess I't because liquibase run in the same process, as gradle task: https://github.com/liquibase/liquibase-gradle-plugin/blob/master/src/main/groovy/org/liquibase/gradle/LiquibaseTask.groovy#L97

from liquibase-gradle-plugin.

stevesaliman avatar stevesaliman commented on August 29, 2024

There is a difference between a Java system property and a Liquibase changelog parameter. System properties are available to anything running inside the JVM. Changelog parameters are a map used by Liquibase itself to perform substitutions as it processes the changelogs.

To set a changelog parameter, I need to pass it to Liquibase with the -D option so that Liquibase will see it. Liquibase's choice of -D is somewhat unfortunate because it leads to the impression that it sets system properties, and Liquibase doesn't pay any attention to system properties.

I'm not sure what the maven plugin does, but if I was to make a guess, it probably converts the <systemProperties> section into changelog parameters like the Gradle plugin does.

If you really need to use system properties instead of changelog parameters like your example above, it wouldn't be too hard to have the build.gradle file read system properties and convert them into parameters.

from liquibase-gradle-plugin.

anil-bijlwan avatar anil-bijlwan commented on August 29, 2024

@stevesaliman I was looking for a solution using liquibase-maven-plugin using simple java app but not able to achieve.
I want to enable liquibase for Oracle DB deployment using ssl(TCPS), to make it work simply need to set some jvm args with keystore and trustore which is not the case as maven can't set jvm args/not sure since jvm doesn't come into picture.

Is this feasible that by using liquibase gradle plugin I can authenticate oracle secure DB with jvm args?? I have done this authentication through spring boot liquibase autoconfigure but that is not built to provide all liquibase feature like rollback, diff etc.

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.