public interface DeploymentContext
bash) will most likely work. Also is it not a complete shell script but a script fragment. Which means that a wrong syntax can cause the whole setup to fail.
Modifier and Type | Method and Description |
---|---|
void |
addDirectory(String targetDirectory,
FileInformation fileInformation) |
void |
addFile(ContentProvider content,
String targetFile,
FileInformation fileInformation)
Add a file to the deployment package
Add the content of the input stream as a file in the target system |
void |
addInstallDependency(String packageName) |
void |
addPostInstallationScript(Reader reader)
Add a script as post installation script
|
void |
addPostRemovalScript(Reader reader)
Add a script as post removal script
|
void |
addPreInstallationScript(Reader reader)
Add a script as pre installation script
|
void |
addPreRemovalScript(Reader reader)
Add a script as pre removal script
|
String |
getPackageName()
Get the name of the package that will be built
This is the name, not the file name, of the package. |
void |
runAfterInstallation(String script)
Run a shell script fragment after the installation or upgrade of the
package
|
void |
runAfterRemoval(String script)
Run a shell script fragment after package was completely removed
|
String getPackageName()
void addInstallDependency(String packageName)
void addPreInstallationScript(Reader reader) throws IOException
The method has to close the reader before it returns. Even in the case of an exception.
reader
- the content to addIOException
- if anything goes wrongvoid addPostInstallationScript(Reader reader) throws IOException
The method has to close the reader before it returns. Even in the case of an exception.
reader
- the content to addIOException
- if anything goes wrongvoid addPreRemovalScript(Reader reader) throws IOException
The method has to close the reader before it returns. Even in the case of an exception.
reader
- the content to addIOException
- if anything goes wrongvoid addPostRemovalScript(Reader reader) throws IOException
The method has to close the reader before it returns. Even in the case of an exception.
reader
- the content to addIOException
- if anything goes wrongvoid runAfterInstallation(String script)
script
- the script fragment to runvoid runAfterRemoval(String script)
script
- the script fragment to runvoid addFile(ContentProvider content, String targetFile, FileInformation fileInformation) throws IOException
The method has to close the input stream before it returns. Even in the case of an exception.
content
- the content to addtargetFile
- the name of the file in the target systemoptions
- a list of optionsIOException
- if anything goes wrongvoid addDirectory(String targetDirectory, FileInformation fileInformation)