liquibase / liquibase-gradle-plugin

A Gradle plugin for Liquibase
Other
199 stars 59 forks source link

ChangeLogFile not found, but exists at path #112

Closed lazydoc closed 1 year ago

lazydoc commented 1 year ago

I'm trying to execute liquibase with the gradle plugin. But the changeset file is not found. I have no glue what I'm doing wrong.

I get the following error:

2022-12-19T15:59:29.483+0100 [ERROR] [system.err] liquibase.exception.ChangeLogParseException: C:/Dev/Workspace/Others/zas/zas-db/src/main/resources/yaml/00.00.changelog.yaml does not exist

The file exists at this path.

My build.gradle:

plugins {
    id 'org.liquibase.gradle' version '2.0.4'
    id 'java'
}

group = 'de.application'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

repositories {
    mavenCentral()
}

dependencies {
    liquibaseRuntime 'org.liquibase:liquibase-core:4.17.2'
    liquibaseRuntime 'info.picocli:picocli:4.7.0'
    liquibaseRuntime 'org.mariadb.jdbc:mariadb-java-client:3.1.0'
}

liquibase {
    activities {
        main {
            changelogFile "$projectDir/src/main/resources/yaml/00.00.changelog.yaml"
            url "jdbc:mariadb://localhost:3306/zas-test?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"
            username "root"
            password ""
        }
    }
}
lazydoc commented 1 year ago

It worked when providing a relative path. I thought absolute paths should work as well. But it seems error on my side