我正在運行 Java 17、mvn 3.8.4、liquibase(和 liquibase-maven-plugin)4.7.1、windows 10。
運行時mvn liquibase:generateChangeLog,我有這個輸出:
> mvn liquibase:generateChangeLog
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< be.liege.cti.tutorial:breakme >--------------------
[INFO] Building breakme 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] --- liquibase-maven-plugin:4.7.1:generateChangeLog (default-cli) @ breakme ---
[INFO] ------------------------------------------------------------------------
[project, pluginDescriptor]
[INFO] Parsing Liquibase Properties File
[INFO] File: src/main/resources/liquibase.properties
[INFO] 'migrationSqlOutputFile' in properties file is not being used by this task.
[INFO] 'changeLogFile' in properties file is not being used by this task.
[INFO] 'diffChangeLogFile' in properties file is not being used by this task.
[INFO] 'referenceUrl' in properties file is not being used by this task.
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO]
[INFO] Liquibase Community 4.7.1 by Liquibase
[INFO] ####################################################
## _ _ _ _ ##
## | | (_) (_) | ##
## | | _ __ _ _ _ _| |__ __ _ ___ ___ ##
## | | | |/ _` | | | | | '_ \ / _` / __|/ _ \ ##
## | |___| | (_| | |_| | | |_) | (_| \__ \ __/ ##
## \_____/_|\__, |\__,_|_|_.__/ \__,_|___/\___| ##
## | | ##
## |_| ##
## ##
## Get documentation at docs.liquibase.com ##
## Get certified courses at learn.liquibase.com ##
## Free schema change activity reports at ##
## https://hub.liquibase.com ##
## ##
####################################################
Starting Liquibase at 11:31:27 (version 4.7.1 #1239 built at 2022-01-20 20:31 0000)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.209 s
[INFO] Finished at: 2022-02-18T11:31:27 01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:4.7.1:generateChangeLog (default-cli) on project breakme: The output changeLogFile must be specified. -> [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/MojoExecutionException
因此,此任務未使用changeLogFile并且必須指定輸出 changeLogFile ;-)
有人可以幫我在我的專案中使用 liquibase 嗎?;-)
非常感謝您的時間和幫助。
這是pom.xml片段:
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase.version}</version>
<configuration>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
<changeLogFile>src/main/resources/db/updateDB.xml</changeLogFile>
</configuration>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
</dependencies>
</plugin>
和liquibase.properties檔案:
changeLogFile=src/main/resources/db/changelog/db.changelog-master.xml
diffChangeLogFile=target/db.changelog-diff.xml
# migrationSqlOutputFile is set in pom.xml - See https://liquibase.jira.com/browse/CORE-2708
migrationSqlOutputFile=target/migration.sql
driver=org.postgresql.Driver
referenceUrl=jdbc:postgresql://localhost:5432/breakmedb
url=jdbc:postgresql://localhost:5432/breakmedb
username=breaker
password=br34K
干杯,
uj5u.com熱心網友回復:
錯誤訊息說,必須提供輸出changeLogFile。您指定changeLogFile而不是outputChangeLogFile.
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/431669.html
標籤:爪哇 PostgreSQL 行家 液基
