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.xmlfile.
-
-
Constructor Summary
Constructors Constructor Description Container()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainercreateContainer(Configuration configuration, Logger logger, CargoProject project)Creates the container based on its configuration and attaches the logger.ContainercreateContainer(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.ArtifactInstallergetArtifactInstaller()StringgetContainerId()StringgetContextKey()Dependency[]getDependencies()StringgetHome()StringgetImplementation()StringgetInstallerZipFile()FilegetLog()LogLevelgetLogLevel()StringgetOutput()Map<String,String>getSystemProperties()FilegetSystemPropertiesFile()LonggetTimeout()ContainerTypegetType()ZipUrlInstallergetZipUrlInstaller()voidsetAppend(boolean append)voidsetArtifactInstaller(ArtifactInstaller artifactInstaller)voidsetContainerId(String containerId)voidsetContextKey(String contextKey)voidsetDependencies(Dependency[] dependencies)voidsetHome(String home)voidsetImplementation(String implementation)voidsetLog(File log)voidsetLogLevel(String levelAsString)voidsetOutput(String output)voidsetSystemProperties(Map<String,String> systemProperties)voidsetSystemPropertiesFile(File systemPropertiesFile)voidsetTimeout(Long timeout)voidsetType(ContainerType type)voidsetZipUrlInstaller(ZipUrlInstaller zipUrlInstaller)booleanshouldAppend()
-
-
-
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:
ZipUrlInstallerfor the container.
-
setZipUrlInstaller
public void setZipUrlInstaller(ZipUrlInstaller zipUrlInstaller)
- Parameters:
zipUrlInstaller-ZipUrlInstallerfor the container.
-
getArtifactInstaller
public ArtifactInstaller getArtifactInstaller()
- Returns:
ArtifactInstallerfor the container.
-
setArtifactInstaller
public void setArtifactInstaller(ArtifactInstaller artifactInstaller)
- Parameters:
artifactInstaller-ArtifactInstallerfor 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 resolveArtifactobjects. 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.
-
-