Git Product home page Git Product logo

Comments (6)

DKroot avatar DKroot commented on August 29, 2024

I have a Gradle build that runs a custom Java/Groovy class from a custom dependency. So, if your class could run in a build task rather than in a changeset this should work.

from liquibase-gradle-plugin.

stevesaliman avatar stevesaliman commented on August 29, 2024

Another thing that comes to mind is that you might be able to put HelloWorld.groovy inside your project's buildSrc/src/main/groovy/foo directory. Classes in buildSrc shoudl automatically be part of the classpsth.

from liquibase-gradle-plugin.

dgeissl avatar dgeissl commented on August 29, 2024

As far as i see it you can use the older buildscript plugin syntax and include jars with custom tasks etc. in the buildscript classpath. Not sure if it's needed for the jdbc drivers though:

buildscript {
    repositories {
        flatDir {
           dirs 'libs'
        }
        mavenCentral()
    }
    
    dependencies {
        classpath (
            // liquibase
            [group: 'org.liquibase', name:'liquibase-core', version:'3.5.3'],
            // gradle plugin
            [group: 'org.liquibase', name:'liquibase-gradle-plugin', version:'1.2.4'],
            // jdbc driver
            [group: 'com.ibm.db2', name: 'db2jcc', version: '3.59.81'],
            // our own extensions
            [name: 'liquibase-extensions', version: '1.0-SNAPSHOT']
        )
    }
}

from liquibase-gradle-plugin.

dgeissl avatar dgeissl commented on August 29, 2024

Ok i tested a bit, and the classpath of a activity works for jdbc drivers but not for extensions as the extensions will not find the liquibase classes. So it seems extensions need to be attached to the buildscript classpath while jdbc drivers and ears/wars can be given to the activity classpath.

Not sure what can be done about it.

Edit:
maybe it's that i used a method that was not present in liquibase 5.3.1 as i developed my changes against the latest version 3.5.3, ill check this out the next days

from liquibase-gradle-plugin.

stevesaliman avatar stevesaliman commented on August 29, 2024

Version 2.0.0 of the plugin adds liquibaseRuntime dependencies for setting up the classpath that Liquibase will use when it runs. Does this help solve the issue? If the custom code is part of the project itself, you can add liquibaseRuntime sourceSets.main.output as a dependency.

from liquibase-gradle-plugin.

stevesaliman avatar stevesaliman commented on August 29, 2024

Closed due to inactivity. If this is still an issue with the latest versions of Liquibase and the plugin, we can always open a new issue.

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.