gillesB / start-embedded-postgresql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Note:

After writing this Maven plugin I found out that a similar plugin already exists. https://gitlab.com/janecekpetr/embedded-postgresql-maven-plugin

It is more versatile and better.

Start Embedded PostgreSQL Mojo

A simple Maven Mojo which creates an embedded PostgreSQL database and performs a Flyway migration on it. To generate the embedded database OpenTable Embedded PostgreSQL is used.

The database can for example be used by JOOQ's code generation. This Mojo was developed to generate this code without using an actual PostgreSQL database. The provided integration test performs such a code generation.

Parameters

Parameter Default value Description
flywayDirectory src/main/resources/db/migration The filesystem folder containing the Flyway migration files. Only SQL migrations supported.

Created Properties

Property Value Description
pgHost localhost The host of the PostgreSQL server.
pgPort Random port The port of the PostgreSQL server.
pgDbName Random name The name of the PostgreSQL database.
pgUser postgres The user to connect to the PostgreSQL server.
pgPw postgres The password to connect to the PostgreSQL server.

About

License:Apache License 2.0


Languages

Language:Java 92.3%Language:Groovy 7.7%