Class Container
- java.lang.Object
-
- org.codehaus.cargo.maven3.configuration.Container
-
public class Container extends Object
Holds configuration data for the<container>
tag used to configure the plugin in thepom.xml
file.
-
-
Constructor Summary
Constructors Constructor Description Container()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Container
createContainer(Configuration configuration, Logger logger, CargoProject project)
Creates the container based on its configuration and attaches the logger.Container
createContainer(Configuration configuration, Logger logger, CargoProject project, org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver, org.apache.maven.project.ProjectBuildingRequest projectBuildingRequest, org.apache.maven.settings.Settings settings)
Creates the container based on its configuration and attaches the logger.ArtifactInstaller
getArtifactInstaller()
String
getContainerId()
String
getContextKey()
Dependency[]
getDependencies()
String
getHome()
String
getImplementation()
String
getInstallerZipFile()
File
getLog()
LogLevel
getLogLevel()
String
getOutput()
Map<String,String>
getSystemProperties()
File
getSystemPropertiesFile()
Long
getTimeout()
ContainerType
getType()
ZipUrlInstaller
getZipUrlInstaller()
void
setAppend(boolean append)
void
setArtifactInstaller(ArtifactInstaller artifactInstaller)
void
setContainerId(String containerId)
void
setContextKey(String contextKey)
void
setDependencies(Dependency[] dependencies)
void
setHome(String home)
void
setImplementation(String implementation)
void
setLog(File log)
void
setLogLevel(String levelAsString)
void
setOutput(String output)
void
setSystemProperties(Map<String,String> systemProperties)
void
setSystemPropertiesFile(File systemPropertiesFile)
void
setTimeout(Long timeout)
void
setType(ContainerType type)
void
setZipUrlInstaller(ZipUrlInstaller zipUrlInstaller)
boolean
shouldAppend()
-
-
-
Method Detail
-
setSystemProperties
public void setSystemProperties(Map<String,String> systemProperties)
- Parameters:
systemProperties
- System properties.
-
getSystemPropertiesFile
public File getSystemPropertiesFile()
- Returns:
- System properties loaded from file.
-
setSystemPropertiesFile
public void setSystemPropertiesFile(File systemPropertiesFile)
- Parameters:
systemPropertiesFile
- System properties loaded from file.
-
getTimeout
public Long getTimeout()
- Returns:
- Timeout (in milliseconds).
-
getInstallerZipFile
public String getInstallerZipFile()
- Returns:
- installed zip file (null if not downloaded).
-
setTimeout
public void setTimeout(Long timeout)
- Parameters:
timeout
- Timeout (in milliseconds).
-
getDependencies
public Dependency[] getDependencies()
- Returns:
- List of dependencies.
-
setDependencies
public void setDependencies(Dependency[] dependencies)
- Parameters:
dependencies
- List of dependencies.
-
getType
public ContainerType getType()
- Returns:
- Container type.
-
setType
public void setType(ContainerType type)
- Parameters:
type
- Container type.
-
getContainerId
public String getContainerId()
- Returns:
- Container id.
-
setContainerId
public void setContainerId(String containerId)
- Parameters:
containerId
- Container id.
-
getHome
public String getHome()
- Returns:
- Container home.
-
setHome
public void setHome(String home)
- Parameters:
home
- Container home.
-
getOutput
public String getOutput()
- Returns:
- Output file.
-
setOutput
public void setOutput(String output)
- Parameters:
output
- Output file.
-
getZipUrlInstaller
public ZipUrlInstaller getZipUrlInstaller()
- Returns:
ZipUrlInstaller
for the container.
-
setZipUrlInstaller
public void setZipUrlInstaller(ZipUrlInstaller zipUrlInstaller)
- Parameters:
zipUrlInstaller
-ZipUrlInstaller
for the container.
-
getArtifactInstaller
public ArtifactInstaller getArtifactInstaller()
- Returns:
ArtifactInstaller
for the container.
-
setArtifactInstaller
public void setArtifactInstaller(ArtifactInstaller artifactInstaller)
- Parameters:
artifactInstaller
-ArtifactInstaller
for the container.
-
shouldAppend
public boolean shouldAppend()
- Returns:
- Whether to append logs.
-
setAppend
public void setAppend(boolean append)
- Parameters:
append
- Whether to append logs.
-
setLog
public void setLog(File log)
- Parameters:
log
- Log file.
-
getLog
public File getLog()
- Returns:
- Log file.
-
setLogLevel
public void setLogLevel(String levelAsString)
- Parameters:
levelAsString
- Log level.
-
getLogLevel
public LogLevel getLogLevel()
- Returns:
- Log level.
-
getImplementation
public String getImplementation()
- Returns:
- Container implementation.
-
setImplementation
public void setImplementation(String implementation)
- Parameters:
implementation
- Container implementation.
-
getContextKey
public String getContextKey()
- Returns:
- Container context key, which can be used to start, stop, configure or deploy to the same Cargo container (together with its configuration) from different Maven artifacts.
-
setContextKey
public void setContextKey(String contextKey)
- Parameters:
contextKey
- Container context key, which can be used to start, stop, configure or deploy to the same Cargo container (together with its configuration) from different Maven artifacts.
-
createContainer
public Container createContainer(Configuration configuration, Logger logger, CargoProject project) throws org.apache.maven.plugin.MojoExecutionException
Creates the container based on its configuration and attaches the logger.- Parameters:
configuration
- Container configuration.logger
- Logger.project
- Cargo project.- Returns:
- Container configuration.
- Throws:
org.apache.maven.plugin.MojoExecutionException
- If container creation fails.
-
createContainer
public Container createContainer(Configuration configuration, Logger logger, CargoProject project, org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver, org.apache.maven.project.ProjectBuildingRequest projectBuildingRequest, org.apache.maven.settings.Settings settings) throws org.apache.maven.plugin.MojoExecutionException
Creates the container based on its configuration and attaches the logger.- Parameters:
configuration
- Container configuration.logger
- Logger.project
- Cargo project.artifactResolver
- The artifact resolver is used to dynamically resolveArtifact
objects. It will automatically download whatever needed.projectBuildingRequest
- Maven project building request.settings
- Maven 3 settings.- Returns:
- Container configuration.
- Throws:
org.apache.maven.plugin.MojoExecutionException
- If container creation fails.
-
-