Package io.fabric8.maven.docker
Class StopMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- io.fabric8.maven.docker.AbstractDockerMojo
-
- io.fabric8.maven.docker.StopMojo
-
- All Implemented Interfaces:
ConfigHelper.Customizer,org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo,org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
@Mojo(name="stop", defaultPhase=POST_INTEGRATION_TEST) public class StopMojo extends AbstractDockerMojoMojo for stopping containers. If called together withdocker:start(i.e. when configured for integration testing in a lifefcycle phase), then only the container started by this goal will be stopped and removed by default (this can be tuned with the system propertydocker.keepContainer). If this goal is called standalone, then all containers are stopped, for which images has been configured in the pom.xml- Since:
- 26.03.14
- Author:
- roland
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanautoCreateCustomNetworksWhether to create the customs networks (user-defined bridge networks) before starting automaticallyprotected booleanskip-
Fields inherited from class io.fabric8.maven.docker.AbstractDockerMojo
archive, autoPull, buildArgs, CONTEXT_KEY_BUILD_TIMESTAMP, CONTEXT_KEY_LOG_DISPATCHER, CONTEXT_KEY_START_CALLED, DOCKER_BUILD_TIMESTAMP, dockerAccessFactory, execution, imageConfigResolver, imagePullPolicy, jib, jibImageFormat, keepContainer, log, mavenFileFilter, mavenFilterReader, outputDirectory, packaging, project, reactorProjects, registry, removeVolumes, serviceHubFactory, session, settings, skipExtendedAuth, skipPom, sourceDirectory, useColor, verbose
-
-
Constructor Summary
Constructors Constructor Description StopMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Entry point for this plugin.protected voidexecuteInternal(ServiceHub hub)Hook for subclass for doing the real job-
Methods inherited from class io.fabric8.maven.docker.AbstractDockerMojo
contextualize, createMojoParameters, createProjectPaths, customizeConfig, getBuildTimestamp, getBuildTimestampFile, getContainerNameMatcher, getContainersForPattern, getDockerAccessContext, getGavLabel, getImageNameMatcher, getImagePullManager, getLogDispatcher, getLogPrefix, getReferenceDate, getRegistryConfig, getResolvedImages, getVolumes, invokedTogetherWithDockerStart, isDockerAccessRequired, pullImage, shouldSkipPom
-
-
-
-
Field Detail
-
autoCreateCustomNetworks
@Parameter(property="docker.autoCreateCustomNetworks", defaultValue="false") protected boolean autoCreateCustomNetworksWhether to create the customs networks (user-defined bridge networks) before starting automatically
-
skip
@Parameter(property="docker.skip", defaultValue="false") protected boolean skip
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionDescription copied from class:AbstractDockerMojoEntry point for this plugin. It will set up the helper class and then callsAbstractDockerMojo.executeInternal(ServiceHub)which must be implemented by subclass.- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractDockerMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
executeInternal
protected void executeInternal(ServiceHub hub) throws org.apache.maven.plugin.MojoExecutionException, IOException, ExecException
Description copied from class:AbstractDockerMojoHook for subclass for doing the real job- Specified by:
executeInternalin classAbstractDockerMojo- Parameters:
hub- context for accessing backends- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOExceptionExecException
-
-