@Override
    public void executeInternal(ServiceHub hub) throws DockerAccessException, MojoExecutionException {
        if (skipTag) {
            return;
        }

        List<ImageConfiguration> imageConfigs = getResolvedImages();
        for (ImageConfiguration imageConfig : imageConfigs) {
            BuildImageConfiguration buildConfig = imageConfig.getBuildConfiguration();

            if (buildConfig == null || buildConfig.skipTag() || buildConfig.isBuildX()) {
                // Tag happens at the building stage.
                continue;
            }

            hub.getBuildService().tagImage(imageConfig.getName(), tagName, repo, buildConfig.cleanupMode());
        }
    }
Goal for Tagging an image so that it becomes part of a repository.
src/main/java/io/fabric8/maven/docker/TagMojo.java