Class PostgresqlAbstractMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- dk.kosmisk.postgresql.maven.plugin.PostgresqlAbstractMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
PostgresqlSetupMojo,PostgresqlShutdownMojo,PostgresqlStartupMojo
public abstract class PostgresqlAbstractMojo extends org.apache.maven.plugin.AbstractMojoCommon data for starting up and shutting down PostgreSQL instances- Author:
- Source (source (at) kosmisk.dk)
-
-
Field Summary
Fields Modifier and Type Field Description protected static ConcurrentSkipListSet<String>ARTIFACT_UNPACKEDprotected static ConcurrentHashMap<String,ProcessBuilder>DATABASES_STOP_COMMANDSprotected FilefolderFolder to contain "bin" and "db" directoriesprotected StringnameName of database to be created during startupprotected IntegerportPostgreSQL server instance port number (defaults to dynamically assigned)protected StringportPropertyName of the property to store port number in (default postgresql.${name}.port)
-
Constructor Summary
Constructors Constructor Description PostgresqlAbstractMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static Stringclassifier()Construct a windows/darwin/linux-i386/x64 classifierorg.apache.maven.project.MavenProjectgetProject()protected StringgetPropertyName()protected intresolvePort()protected static StringscriptExtension()Get the script extensionprotected booleanskip()-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
DATABASES_STOP_COMMANDS
protected static final ConcurrentHashMap<String,ProcessBuilder> DATABASES_STOP_COMMANDS
-
ARTIFACT_UNPACKED
protected static final ConcurrentSkipListSet<String> ARTIFACT_UNPACKED
-
name
@Parameter(required=true) protected String name
Name of database to be created during startup
-
port
@Parameter protected Integer port
PostgreSQL server instance port number (defaults to dynamically assigned)
-
portProperty
@Parameter protected String portProperty
Name of the property to store port number in (default postgresql.${name}.port)
-
folder
@Parameter(defaultValue="${project.build.directory}/postgresql", property="postgresql.folder") protected File folderFolder to contain "bin" and "db" directories
-
-
Method Detail
-
skip
protected boolean skip()
-
getPropertyName
protected String getPropertyName()
-
getProject
public org.apache.maven.project.MavenProject getProject()
-
resolvePort
protected int resolvePort() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
classifier
protected static String classifier()
Construct a windows/darwin/linux-i386/x64 classifier- Returns:
- lowercase string ${os}-${architecture}
-
scriptExtension
protected static String scriptExtension()
Get the script extension- Returns:
- .bat for windows, empty string for everything else
-
-