public abstract class AbstractEventStoreMojo
extends org.apache.maven.plugin.AbstractMojo
| Constructor and Description |
|---|
AbstractEventStoreMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
asList(String str)
Returns the string as list.
|
protected void |
checkNotNull(String name,
Object value)
Checks if a variable is not
null and throws an
IllegalNullArgumentException if this rule is violated. |
protected void |
deletePid()
Deletes the process ID file in the target directory.
|
void |
execute() |
protected abstract void |
executeGoal()
Executes the goal code.
|
String |
getArchiveExtension()
Returns the file extension of the archive (Like "zip" or "tar.gz").
|
String |
getArchiveName()
Returns the name of the archive (Like "EventStore-OSS-Win" or
"EventStore-OSS-Linux") without version and file extension.
|
String |
getArchiveVersion()
Returns the version of the archive (Like "3.0.3").
|
String |
getBaseUrl()
Returns the base URl where the event store archives are located.
|
String |
getDownloadUrl()
Returns the full URL where the event store file to download is located.
|
File |
getEventStoreDir()
Returns the directory where the event store should be installed.
|
protected File |
getPidFile()
Returns the PID file.
|
File |
getTargetDir()
Returns the target build directory.
|
protected void |
logDebug(List<String> messages)
Logs all lines in debug mode.
|
protected void |
logError(List<String> messages)
Logs all lines in error mode.
|
protected String |
readPid()
Reads the process ID of the event store from a file in the target
directory.
|
void |
setArchiveExtension(String archiveExtension)
Sets the file extension of the archive (Like "zip" or "tar.gz").
|
void |
setArchiveName(String archiveName)
Sets the name of the archive (Like "EventStore-OSS-Win" or
"EventStore-OSS-Linux") without version and file extension.
|
void |
setArchiveVersion(String archiveVersion)
Sets the version of the archive (Like "3.0.3").
|
void |
setBaseUrl(String baseUrl)
Sets the base URl where the event store archives are located.
|
void |
setDownloadUrl(String downloadUrl)
Sets the full URL where the event store file to download is located.
|
void |
setEventStoreDir(File eventStoreDir)
Sets the directory where the event store should be installed.
|
void |
setTargetDir(File targetDir)
Sets the target build directory.
|
protected void |
writePid(String pid)
Writes the process ID of the event store to a file in the target
directory.
|
protected final void checkNotNull(String name, Object value) throws org.apache.maven.plugin.MojoExecutionException
null and throws an
IllegalNullArgumentException if this rule is violated.name - Name of the variable to be displayed in an error message.value - Value to check for null.org.apache.maven.plugin.MojoExecutionException - Checked value was NULL.public final void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic final String getDownloadUrl() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - Error initializing the variable.public final void setDownloadUrl(String downloadUrl)
downloadUrl - Download archive URL to setpublic final String getBaseUrl() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - Error initializing the variable.public final void setBaseUrl(String baseUrl)
baseUrl - Base URL where archives are located to setpublic final String getArchiveName() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - Error initializing the variable.public final void setArchiveName(String archiveName)
archiveName - Archive name to set.public final String getArchiveVersion()
public final void setArchiveVersion(String archiveVersion)
archiveVersion - The event store version to set.public final String getArchiveExtension() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - Error initializing the variable.public final void setArchiveExtension(String archiveExtension)
archiveExtension - Archive file extension to set.public final File getEventStoreDir() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - Error initializing the variable.public final void setEventStoreDir(File eventStoreDir)
eventStoreDir - Target directory to setpublic final File getTargetDir()
public final void setTargetDir(File targetDir)
targetDir - The build directory to setprotected final void writePid(String pid) throws org.apache.maven.plugin.MojoExecutionException
pid - PID to write.org.apache.maven.plugin.MojoExecutionException - Error writing the PID to file.protected final String readPid() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - Error reading the PID from file.protected final void deletePid()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - Error deleting the PID file.protected final File getPidFile()
protected final List<String> asList(String str) throws org.apache.maven.plugin.MojoExecutionException
str - String to split into lines.org.apache.maven.plugin.MojoExecutionException - Error splitting the string into lines.protected final void logDebug(List<String> messages)
messages - Lines to log.protected final void logError(List<String> messages)
messages - Lines to log.protected abstract void executeGoal()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionCopyright © 2015 Future Invent Informationsmanagement GmbH, Hamburg (Germany). All rights reserved.