I'm running Java 17, mvn 3.8.4, liquibase (and liquibase-maven-plugin) 4.7.1, windows 10.
When running mvn liquibase:generateChangeLog
, I have this output:
> 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
So, changeLogFile
is not bein used by this task and The output changeLogFile must be specified ;-)
Can someone help me to use liquibase on my project? ;-)
Many thanks for your time and help.
This is the pom.xml
fragment:
<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>
And the liquibase.properties
file:
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
Cheers,
CodePudding user response:
The error message says, the output changeLogFile must be provided. You specified changeLogFile
instead of outputChangeLogFile
.