public abstract class AbstractEventStoreMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
static String |
VERSION_URL
URL of the JSON file with available event store versions.
|
| 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 |
getDownloadOsQualifier()
Returns the qualifier that helps selecting the right download.
|
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.
|
String |
getIncludeRc()
Determines if release candidates (versions with "-rc") should be included.
|
protected File |
getPidFile()
Returns the PID file.
|
File |
getTargetDir()
Returns the target build directory.
|
String |
getVersionUrl()
Returns the URl of the version JSON file.
|
boolean |
isIncludeRc()
Determines if release candidates (versions with "-rc") should be included.
|
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 |
setDownloadOsQualifier(String downloadOsQualifier)
Sets the qualifier that helps selecting the right download.
|
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 |
setIncludeRc(String includeRc)
Determines if release candidates (versions with "-rc") should be included.
|
void |
setTargetDir(File targetDir)
Sets the target build directory.
|
void |
setVersionUrl(String versionUrl)
Sets the URl of the version JSON file.
|
protected void |
writePid(String pid)
Writes the process ID of the event store to a file in the target directory.
|
public static final String VERSION_URL
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 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 setpublic String getDownloadOsQualifier()
public void setDownloadOsQualifier(String downloadOsQualifier)
downloadOsQualifier - Qualifier.public String getIncludeRc()
true if RC candidates should be included.public boolean isIncludeRc()
true if RC candidates should be included.public void setIncludeRc(String includeRc)
includeRc - true if RC candidates should be included.public String getVersionUrl()
public void setVersionUrl(String versionUrl)
versionUrl - URl of the version JSON file.protected 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.MojoExecutionException - if goal execution failedCopyright © 2019 fuin.org (Germany). All rights reserved.