- Practical DevOps
- Joakim Verona
- 122字
- 2021-07-16 09:48:08
The pom.xml file
The pom.xml
file, which is a standard Maven project model file, defines things such as the JDBC URL we need so that we can connect to the database we wish to work with as well as the version of the Liquibase plugin.
An H2 database file, /tmp/liquidhello.h2.db
, will be created. H2 is a convenient in-memory database suitable for testing.
This is the pom.xml file for the "liquibase hello world" example:
<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>se.verona.liquibasehello</groupId> <artifactId>liquibasehello</artifactId> <version>1.0-SNAPSHOT</version> <build> <plugins> <plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <version>3.0.0-rc1</version> <configuration> <changeLogFile>src/main/resources/db-changelog.xml </changeLogFile> <driver>org.h2.Driver</driver> <url>jdbc:h2:liquidhello</url> </configuration> <dependencies> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.3.171</version> </dependency> </dependencies> </plugin> </plugins> </build> </project>
If you run the code and everything works correctly, the result will be an H2 database file. H2 has a simple web interface, where you can verify that the database structure is indeed what you expect.
推薦閱讀
- Learn ECMAScript(Second Edition)
- Extending Jenkins
- Visual Basic程序設計(第3版):學習指導與練習
- Mastering Kotlin
- PhoneGap Mobile Application Development Cookbook
- Highcharts Cookbook
- Haxe Game Development Essentials
- Java:High-Performance Apps with Java 9
- Express Web Application Development
- HTML 5與CSS 3權威指南(第3版·上冊)
- Kubernetes源碼剖析
- 深入理解C指針
- Visual Studio Code 權威指南
- Django 5企業級Web應用開發實戰(視頻教學版)
- Python函數式編程(第2版)