1

I have a Spring Boot application that is configured to run Liquibase. I'm trying to set up a separate project that will be used as the database management project. It will store all of liquibase.properties files for different databases.

My database management project depends on my main app because it needs to load the chaneglogFile. However, my database management project cannot find the changelogFile on the classpath.

Here is the folder structure of the main project. The changelog is in src/main/resources so maven automatically adds it to the classpath

enter image description here

Here is the configuration in the liquibase.properties

changeLogFile=classpath:db/changelog/db.changelog-master.yaml

As well as the maven plugin configuration

    <build>
        <plugins>
            <plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <version>3.8.2</version>
                <configuration>
                    <propertyFile>liquibase.properties</propertyFile>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.my-group</groupId>
                        <artifactId>my-app</artifactId>
                        <version>1.0.0-SNAPSHOT</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

And the resulting error

Failed to execute goal org.liquibase:liquibase-maven-plugin:3.8.2:status (default-cli) on project my-app-db: Error setting up or running Liquibase: classpath:db/changelog/db.changelog-master.yaml does not exist
bheussler
  • 1,406
  • 2
  • 15
  • 18
  • the `classpath:` prefix is a Spring specific feature, you probably need `/db/changelog/db.changelog-master.yaml`, see also https://www.liquibase.org/documentation/maven/index.html – Robert Scholte Jan 10 '20 at 22:05
  • @RobertScholte I tried that but didn't have any success. – bheussler Jan 10 '20 at 22:42

1 Answers1

0

what about trying

changeLogFile=src/main/resources/db/changelog/db.changelog-master.yaml

does that work for you?

bilak
  • 4,526
  • 3
  • 35
  • 75