Class Container


  • public class Container
    extends Object
    Holds configuration data for the <container> tag used to configure the plugin in the pom.xml file.
    • Constructor Detail

      • Container

        public Container()
    • Method Detail

      • getSystemProperties

        public Map<String,​String> getSystemProperties()
        Returns:
        System properties.
      • 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.
      • setZipUrlInstaller

        public void setZipUrlInstaller​(ZipUrlInstaller zipUrlInstaller)
        Parameters:
        zipUrlInstaller - ZipUrlInstaller 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 resolve Artifact 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.