- 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.
推薦閱讀
- Designing Machine Learning Systems with Python
- GAE編程指南
- Node.js 10實戰
- 架構不再難(全5冊)
- jQuery EasyUI網站開發實戰
- C語言程序設計(第2版)
- R語言數據可視化實戰
- Jupyter數據科學實戰
- Jenkins Continuous Integration Cookbook(Second Edition)
- Visual Studio 2015高級編程(第6版)
- Mastering Python Design Patterns
- Python機器學習之金融風險管理
- UML2面向對象分析與設計(第2版)
- PHP+MySQL動態網站開發從入門到精通(視頻教學版)
- JavaScript從入門到精通(視頻實戰版)