How to run a liquibase job as a maven build

1. Liquibase Plugin

<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.5.3</version>
<configuration>
<changeLogFile>${liquibase.changeLogFile}</changeLogFile>
<driver>${db.driver}</driver>
<url>${db.url}</url>
<defaultSchemaName>${db.schema}</defaultSchemaName>
<username>${db.username}</username>
<password>${db.password}</password>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
<expressionVariables>
<db.schema>${db.schema}</db.schema>
</expressionVariables>
</configuration>
</plugin>

2. Create a Build Configuration

<profile>
<id>rebuild</id>
<properties>
<liquibase.changeLogFile>src/main/db_resources/changelog/db.rebuild.xml</liquibase.changeLogFile>
</properties>
</profile>

--

--

--

Senior Java Developer with 15 years of professional experience | Startup enthusiast.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

AKS Deployment Step

Java 9: Enhance your Java 8 code with Java 9 Optional API enhancement

Rails 6: Webpacker::Manifest::MissingEntryError

Deploy SSL Enabled CockroachDB Cluster on Docker

Finding the Name and Editor Version Used in Unity Projects

Shared Hosting Vs VPS Hosting Vs Dedicated Server

Shared Hosting Vs VPS Hosting Vs Dedicated Server

TWTW: Dec 16 — Dec 22 2018 | #14

Cool Tricks For Manipulating Arrays In Ruby

Picture of a dome with repeated patterns symbolic of an array in programming

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
czetsuya

czetsuya

Senior Java Developer with 15 years of professional experience | Startup enthusiast.

More from Medium

Java Cryptography Architecture (JCA) by Examples

Dynamic Search API for Spring Data JPA and MongoDB

Experience with Spring batch and docker

Java/ Add Footer to PowerPoint Document