java - Liquibase 上必须指定changeLogFile 错误

标签 java spring postgresql spring-boot liquibase

我是 Liquibase 的新手,我尝试将 liquibase 与 postgres 数据库结合使用,以使用 liquibase 脚本创建数据库表。我所做的是,我已经通过运行命令手动创建了 Postgres 表

mvn liquibase:generateChangeLog

我创建了 liquibase-outputChangeLog.xml 文件。现在我尝试更新该脚本并在数据库中再创建一个表。为此,我在该新表的changeLog.xml 文件中编写XML 代码,并尝试执行命令

mvn liquibase:更新

但它给了我以下错误

必须指定 ChangeLogFile。

下面是我的 POM.xml 文件。

    <dependency>
        <groupId>tech.sample</groupId>
        <artifactId>common-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>tech.sample</groupId>
        <artifactId>common-starter-logging</artifactId>
    </dependency>

    <dependency>
        <groupId>org.liquibase</groupId>
        <artifactId>liquibase-core</artifactId>
        <version>3.8.7</version>
    </dependency>

    <dependency>
        <groupId>org.liquibase</groupId>
        <artifactId>liquibase-maven-plugin</artifactId>
        <version>3.8.7</version>
    </dependency>

    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>42.2.5</version>
    </dependency>

</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
        </plugin>
        <!--Sonar Plugins-->
        <plugin>
            <groupId>org.sonarsource.scanner.maven</groupId>
            <artifactId>sonar-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>com.github.temyers</groupId>
            <artifactId>cucumber-jvm-parallel-plugin</artifactId>
        </plugin>

        <plugin>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-maven-plugin</artifactId>
            <version>3.4.1</version>
            <configuration>
                <propertyFile>src/main/resources/liquibase.properties</propertyFile>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>update</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

他们中的任何一个都可以帮助我吗,这里出了什么问题。

强文本**enter image description here**

最佳答案

我认为问题在于您的 pom.xml <propertyFile>src/main/resources/liquibase.properties</propertyFile> 中指定的属性文件中您已使用ChangeLogFile (大写C)而不是changeLogFile (带有小写的 C)。请注意,错误消息显示正确的大小写。

关于java - Liquibase 上必须指定changeLogFile 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60597635/

相关文章:

java - 如何使用 SLF4JBridgeHandler 以编程方式设置 slf4j 记录器

java - 使用spring获取当前工作目录

postgresql - 如何为Docker容器公开几个端口?

node.js - pg-promise 创建包含使用 $ 参数执行的函数

spring - H2 SQL语法异常

postgresql "keepalives"参数

java - Jface TreeViewer setSelection

java - Gradle 构建失败,java 1.8,构建工具 2.2.0-alpha4,启用 jackOptions

java - ViewPager 和 fragment : Why do I always see the same thing?

java - apache shiro saltedauthentication.hashProvidedCredentials 遇到问题,未给出预期的哈希值