private TarArchiver createBuildArchiver(File outputDir, File archive, List<AssemblyConfiguration> assemblyConfigs) throws NoSuchArchiverException {
        TarArchiver archiver = (TarArchiver) archiverManager.getArchiver(TAR_ARCHIVER_TYPE);
        archiver.setLongfile(TarLongFileMode.posix);

        boolean needsDefaultFileSet = assemblyConfigs.isEmpty();

        for (AssemblyConfiguration assemblyConfig : assemblyConfigs) {
            AssemblyMode mode = assemblyConfig != null ? assemblyConfig.getMode() : null;
            if (mode != null && mode.isArchive()) {
                DefaultArchivedFileSet archiveSet =
                        DefaultArchivedFileSet.archivedFileSet(new File(outputDir, assemblyConfig.getName() + "." + mode.getExtension()));
                archiveSet.setPrefix(assemblyConfig.getName() + "/");
                archiveSet.setIncludingEmptyDirectories(true);
                archiveSet.setUsingDefaultExcludes(false);
                archiver.addArchivedFileSet(archiveSet);
            } else {
                needsDefaultFileSet = true;
            }
        }

        if (needsDefaultFileSet) {
            DefaultFileSet fileSet = DefaultFileSet.fileSet(outputDir);
            fileSet.setUsingDefaultExcludes(false);
            archiver.addFileSet(fileSet);
        }

        archiver.setDestFile(archive);
        return archiver;
    }
Extract all files with a tracking archiver. These can be used to track changes in the filesystem and triggering
a rebuild of the image if needed ('docker:watch')
src/main/java/io/fabric8/maven/docker/assembly/DockerAssemblyManager.java