We started the plugin, see POM, via mvn verify.
We also added a proxy to settings.xml.
We are not able to connect to the port 5432 via telnet localhost 5432 on Windows.
On Linux Ubuntu 16 we are able to connect via telnet and PgAdmin too.
We think that the command line is not constructed so well on Windows.
After we found the ZIP in user home, we extracted and started the database on command line with our commands, the database was bound to the port 5432 and telnet connected to it on Windows.
We used these native commands:
set PGDATA=e:\tmp\zmaz\xx\x\target\data\
pg_ctl initdb
pg_ctl start -D e:\tmp\zmaz\xx\x\target\data\ -l logfile
now telnet:
telnet localhost 5432
Stop the database after successful connection
pg_ctl stop -D e:\tmp\zmaz\xx\x\target\data\ -l logfile
Here is our POM:
<plugin>
<groupId>com.github.slavaz</groupId>
<artifactId>embedded-postgresql-maven-plugin</artifactId>
<version>1.2.2</version>
<configuration>
<pgServerVersion>9.6</pgServerVersion>
<dbName>audit</dbName>
</configuration>
<executions>
<execution>
<id>start-pgsql</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-pgsql</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
Here are Maven Debug logs of plugin configuration:
[DEBUG] Goal: com.github.slavaz:embedded-postgresql-maven-plugin:1.1.0:start (start-pgsql)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<dbName>audit</dbName>
<password default-value="postgres"/>
<pgCharset>${pgCharset}</pgCharset>
<pgDatabaseDir>${pgDatabasedir}</pgDatabaseDir>
<pgLocale>${pgLocale}</pgLocale>
<pgServerPort default-value="5432">${pgPort}</pgServerPort>
<pgServerVersion default-value="latest">9.6</pgServerVersion>
<pluginDependencies default-value="${plugin.artifacts}"/>
<projectBuildDir default-value="${project.build.directory}"/>
<settings default-value="${settings}"/>
<skipGoal default-value="false"/>
<userName default-value="postgres">${username}</userName>
</configuration>
We started the plugin, see POM, via
mvn verify.We also added a proxy to
settings.xml.We are not able to connect to the port
5432viatelnet localhost 5432on Windows.On Linux Ubuntu 16 we are able to connect via
telnetand PgAdmin too.We think that the command line is not constructed so well on Windows.
After we found the ZIP in user home, we extracted and started the database on command line with our commands, the database was bound to the port 5432 and telnet connected to it on Windows.
We used these native commands:
set PGDATA=e:\tmp\zmaz\xx\x\target\data\pg_ctl initdbpg_ctl start -D e:\tmp\zmaz\xx\x\target\data\ -l logfilenow telnet:
telnet localhost 5432Stop the database after successful connection
pg_ctl stop -D e:\tmp\zmaz\xx\x\target\data\ -l logfileHere is our POM:
Here are Maven Debug logs of plugin configuration: