Package io.fabric8.maven.docker
Class CopyMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- io.fabric8.maven.docker.AbstractDockerMojo
-
- io.fabric8.maven.docker.CopyMojo
-
- 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="copy", defaultPhase=POST_INTEGRATION_TEST) public class CopyMojo extends AbstractDockerMojoMojo for copying file or directory from container.
When called with
truevalue ofcreateContainersoption, then all images which are configured in the project are iterated. For each image a temporary container is created (but not started) before the copying and is removed after completion of the copying, even if the copying failed.When called with
falsevalue ofcreateContainersoption (default value) and together withdocker:startgoal, then only the containers started by that goal are examined. Otherwise containers matching images configured in the project are searched and the copying is performed from the found containers only.
-
-
Field Summary
-
Fields inherited from class io.fabric8.maven.docker.AbstractDockerMojo
autoPull, CONTEXT_KEY_BUILD_TIMESTAMP, CONTEXT_KEY_LOG_DISPATCHER, CONTEXT_KEY_START_CALLED, DOCKER_BUILD_TIMESTAMP, dockerAccessFactory, execution, imageConfigResolver, imagePullPolicy, jib, jibImageFormat, keepContainer, log, outputDirectory, packaging, project, registry, removeVolumes, serviceHubFactory, session, settings, skipExtendedAuth, skipPom, sourceDirectory, useColor, verbose
-
-
Constructor Summary
Constructors Constructor Description CopyMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexecuteInternal(ServiceHub hub)Hook for subclass for doing the real jobprotected StringgetPullRegistry()-
Methods inherited from class io.fabric8.maven.docker.AbstractDockerMojo
contextualize, createProjectPaths, customizeConfig, execute, getBuildTimestamp, getBuildTimestampFile, getContainerNameMatcher, getContainersForPattern, getDockerAccessContext, getGavLabel, getImageNameMatcher, getImagePullManager, getLogDispatcher, getLogPrefix, getReferenceDate, getRegistryConfig, getResolvedImages, getVolumes, invokedTogetherWithDockerStart, isDockerAccessRequired, pullImage, shouldSkipPom
-
-
-
-
Method Detail
-
executeInternal
protected void executeInternal(ServiceHub hub) throws IOException, org.apache.maven.plugin.MojoExecutionException
Description copied from class:AbstractDockerMojoHook for subclass for doing the real job- Specified by:
executeInternalin classAbstractDockerMojo- Parameters:
hub- context for accessing backends- Throws:
IOExceptionorg.apache.maven.plugin.MojoExecutionException
-
getPullRegistry
protected String getPullRegistry()
-
-