postgresql-maven-plugin
postgresql-maven-plugin copied to clipboard
Preventing StartMojo hangs on abnormal termination of postgres process.
In case postgres process [/target/pgsql/bin/postgres, -D, /target/data] terminates abnormally during startup (postgres cannot access the server configuration file "/target/data/postgresql.conf": No such file or directory) StartMojo falls into infinite loop and prints nothing.
[INFO] Starting PostgreSQL
while (!started()) {
Thread.sleep(1000L);
}
In this merge request I have added checking if process is alive and throwing an exception in case it isn't