dev-resources.site
for different kinds of informations.
Adding Liquibase plugin into Apache Maven managed project
Published at
4/18/2024
Categories
java
maven
Author
saladlam
Author
8 person written this
saladlam
open
Setup
Content of database/liquibase.properties
driver: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/databasename
username: root
password: password
Add the following into Maven's pom.xml file
<build>
<plugins>
<!-- other plugins ... -->
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>4.27.0</version>
<configuration>
<propertyFile>${project.basedir}/database/liquibase.properties</propertyFile>
<!-- must use relative path because this will save into `databasechangelog` table
rollback will fail if `FILENAME` not match -->
<changeLogFile>database/changelog.xml</changeLogFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<!-- other sections ... -->
And put the database change file changelog.xml into database directory of project root.
Command
Apply all changes into the database
mvn liquibase:update
Available commands can refer to here.
maven Article's
30 articles in total
SpringBoot Web Service - Part 5 - Github Action
read article
SpringBoot Web Service - Part 2 - Preparing Using Spring Initializr
read article
SpringBoot Web Service - Part 1 - Create Repository
read article
SpringBoot Web Service - Part 4 - Initial Configuration
read article
Identifying and Removing Unused Dependencies in pom.xml
read article
JeKa: The Simplest Way to Start with Java for Real
read article
JeKa: The Simplest Way to Create Uber and Shade Jars
read article
JeKa: The Simplest Way to Publish on Maven Central
read article
Preparando o ambiente de desenvolvimento da melhor API de tabelas de campeonato que vocรช jรก viu!
read article
Maven Guide for Beginners
read article
Wednesday Links - Edition 2024-10-16
read article
Unlock 10% Discounts in 5 Minutes: Build a Drools Project with Maven
read article
Getting Started with Maven
read article
Quick fix: com.github.everit-org.json-schema:org.everit.json.schema:jar:1.12.2 was not found
read article
How to deploy to maven central repo
read article
No SNAPSHOTs
read article
Maven Commands Cheat Sheet
read article
Apache Maven Kirish
read article
Difference between mvn install and mvn package
read article
Adding Liquibase plugin into Apache Maven managed project
currently reading
Accelerate Maven Application Builds: Maximizing Efficiency with Docker Volumes for Maven Repository Sharing
read article
Check for newer versions of dependencies in pom.xml
read article
Accelerate Your Automation Testing with Maven: A Step-by-Step Guide ๐
read article
Junit Badge For Git Project
read article
Jenkins CICD
read article
Set JVM Timezone when running JUnit 5 tests
read article
Maven 4 - Part I - Easier Versions
read article
An Updated Guide to Maven Archetypes
read article
H2 database Setup Error Unable to load name org.hibernate.dialect.Oracle10gDialect
read article
Why I prefer Maven over Gradle
read article
Featured ones: