Package io.fabric8.maven.docker
Class BuildMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- io.fabric8.maven.docker.AbstractDockerMojo
-
- io.fabric8.maven.docker.AbstractBuildSupportMojo
-
- io.fabric8.maven.docker.BuildMojo
-
- 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="build", defaultPhase=INSTALL, requiresDependencyResolution=TEST) public class BuildMojo extends AbstractBuildSupportMojoMojo for building a data image- Since:
- 28.07.14
- Author:
- roland
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbuildArchiveOnlySkip Sending created tarball to docker daemonstatic StringDMP_PLUGIN_DESCRIPTORstatic StringDOCKER_EXTRA_DIRprotected Stringnameprotected booleanskipBuildprotected booleanskipTagSkip building tags-
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 BuildMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildAndTag(ServiceHub hub, ImageConfiguration imageConfig)protected voidexecuteInternal(ServiceHub hub)Hook for subclass for doing the real jobprotected DategetReferenceDate()-
Methods inherited from class io.fabric8.maven.docker.AbstractBuildSupportMojo
createMojoParameters, getBuildContext
-
Methods inherited from class io.fabric8.maven.docker.AbstractDockerMojo
contextualize, createProjectPaths, customizeConfig, execute, getBuildTimestamp, getBuildTimestampFile, getContainerNameMatcher, getContainersForPattern, getDockerAccessContext, getGavLabel, getImageNameMatcher, getImagePullManager, getLogDispatcher, getLogPrefix, getRegistryConfig, getResolvedImages, getVolumes, invokedTogetherWithDockerStart, isDockerAccessRequired, pullImage, shouldSkipPom
-
-
-
-
Field Detail
-
DMP_PLUGIN_DESCRIPTOR
public static final String DMP_PLUGIN_DESCRIPTOR
- See Also:
- Constant Field Values
-
DOCKER_EXTRA_DIR
public static final String DOCKER_EXTRA_DIR
- See Also:
- Constant Field Values
-
skipBuild
@Parameter(property="docker.skip.build", defaultValue="false") protected boolean skipBuild
-
name
@Parameter(property="docker.name", defaultValue="") protected String name
-
buildArchiveOnly
@Parameter(property="docker.buildArchiveOnly", defaultValue="false") protected String buildArchiveOnlySkip Sending created tarball to docker daemon
-
skipTag
@Parameter(property="docker.skip.tag", defaultValue="false") protected boolean skipTagSkip building tags
-
-
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
-
buildAndTag
protected void buildAndTag(ServiceHub hub, ImageConfiguration imageConfig) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-
getReferenceDate
protected Date getReferenceDate()
- Overrides:
getReferenceDatein classAbstractDockerMojo
-
-