@Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        if (!skip) {
            boolean ansiRestore = Ansi.isEnabled();
            File output = null;
            if (outputFile != null) {
                output = new File(outputFile);
                if (output.exists()) {
                    output.delete();
                }
            }
            log = new AnsiLogger(getLog(), useColorForLogging(), verbose, !settings.getInteractiveMode(), getLogPrefix(), output);

            try {
                authConfigFactory.setLog(log);
                imageConfigResolver.setLog(log);

                LogOutputSpecFactory logSpecFactory = new LogOutputSpecFactory(useColor, logStdout, logDate);

                ConfigHelper.validateExternalPropertyActivation(project, getAllImages());

                DockerAccess access = null;
                try {
                    // The 'real' images configuration to use (configured images + externally resolved images)
                    this.minimalApiVersion = initImageConfiguration(getBuildTimestamp());
                    if (isDockerAccessRequired()) {
                        DockerAccessFactory.DockerAccessContext dockerAccessContext = getDockerAccessContext();
                        access = dockerAccessFactory.createDockerAccess(dockerAccessContext);
                    }
                    ServiceHub serviceHub = serviceHubFactory.createServiceHub(project, session, access, log, logSpecFactory);
                    executeInternal(serviceHub);
                } catch (IOException | ExecException exp) {
                    logException(exp);
                    throw new MojoExecutionException(log.errorMessage(exp.getMessage()), exp);
                } catch (MojoExecutionException exp) {
                    logException(exp);
                    throw exp;
                } finally {
                    if (access != null) {
                        access.shutdown();
                    }
                }
            } finally {
                Ansi.setEnabled(ansiRestore);
                try {
                    log.close();
                } catch (IOException exp) {
                    logException(exp);
                }
            }
        }
    }
Entry point for this plugin. It will set up the helper class and then calls
{@link #executeInternal(ServiceHub)}
which must be implemented by subclass.

@throws MojoExecutionException
@throws MojoFailureException
src/main/java/io/fabric8/maven/docker/AbstractDockerMojo.java