Package io.fabric8.maven.docker
Class WatchMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- io.fabric8.maven.docker.AbstractDockerMojo
-
- io.fabric8.maven.docker.AbstractBuildSupportMojo
-
- io.fabric8.maven.docker.WatchMojo
-
- 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="watch") public class WatchMojo extends AbstractBuildSupportMojo
Mojo for watching source code changes. This Mojo does essentially two things when it detects a image content change:- Rebuilding one or more images
- Restarting restarting one or more containers
- Since:
- 16/06/15
- Author:
- roland
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanautoCreateCustomNetworksWhether to create the customs networks (user-defined bridge networks) before starting automatically-
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 WatchMojo()
-
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 WatchService.WatchContextgetWatchContext(ServiceHub hub)-
Methods inherited from class io.fabric8.maven.docker.AbstractBuildSupportMojo
createMojoParameters, getBuildContext
-
Methods inherited from class io.fabric8.maven.docker.AbstractDockerMojo
contextualize, 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
-
getWatchContext
protected WatchService.WatchContext getWatchContext(ServiceHub hub) throws IOException
- Throws:
IOException
-
-