尝试在Derby和MSSQL数据库中同时执行脚本时出现Liquibase错误

时间:2019-11-18 06:29:59

标签: maven liquibase

我正在尝试使用maven和liquibase在两个不同的环境上执行一些脚本。但是,当前配置给我一个错误(如下所述)。我已经包括了所有必要的细节。

错误日志

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.145 s
[INFO] Finished at: 2019-11-18T11:38:15+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.6.1:update (default-cli) on project LiquibaseDemo: The database URL has not been specified either as a parameter or in a properties file. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

pom.xml插件

<build>
    <pluginManagement>
        <plugins>
                <plugin>
                        <groupId>org.liquibase</groupId>
                        <artifactId>liquibase-maven-plugin</artifactId>
                        <version>3.6.1</version>
                        <executions>
                            <execution>
                                    <id>db1-update</id>
                                    <phase>process-resources</phase>
                                    <configuration>
                                            <propertyFile>src/main/resources/db/changelog/derby.properties</propertyFile>
                                    </configuration>
                                    <goals>
                                            <goal>update</goal>
                                    </goals>
                            </execution>
                            <execution>
                                    <id>db2-update</id>
                                    <phase>process-resources</phase>
                                    <configuration>
                                            <propertyFile>src/main/resources/db/changelog/mssql.properties</propertyFile>
                                    </configuration>
                                    <goals>
                                            <goal>update</goal>
                                    </goals>
                            </execution>
                        </executions>
                </plugin>
        </plugins>
    </pluginManagement>
</build>

属性文件

derby

url:jdbc:derby://localhost:1527/sample1;create=true
changeLogFile:src/main/resources/db/changelog/derby_changelog
driver:org.apache.derby.jdbc.ClientDriver
username:liquibase
password:liquibase

mssql

url:jdbc:sqlserver://10.10.180.52:1433;databaseName=db_test_liquibase
changeLogFile:src/main/resources/db/changelog/mssql_changelog
driver:com.microsoft.sqlserver.jdbc.SQLServerDriver
username:liquibase1
password:-

0 个答案:

没有答案