Is it possible to use PostgreSQL in a Maven assembly?

I am trying to create an integration test that requires a PostgreSQL server to start. Is it possible to start the server in the maven assembly and stop it when the tests are completed (in a separate process, I think)? Assuming the PostgreSQL server is not installed on the computer.

+3
source share
6 answers

I started writing a plugin for this purpose:

https://github.com/adrianboimvaser/postgresql-maven-plugin

This is at a very early stage and not enough documentation, but basically it works. I have already released version 0.1 in Maven Central.

PostgreSQL maven. .

!

+5

maven , , .

postgresql zip.

, maven ant . ant . :

  • unzip postgresql-xxx.zip → INSTALL_DIR
  • → DATA_DIR
  • /bin/init-db -D
  • /bin/postgres -D
  • /bin/create_db -EUNICODE test

.

: , (, , TCP/IP, , , )

...

.

+6

. , .

0

, , db, / .

, / db.

0

, . , CI, , Cruise Control Bamboo.

, CI-db, CI, bash/python/ , , , . - Liquibase, CI db , .

0

All Articles