private void ensureUniqueAssemblyNames(Logger log) {
        List<AssemblyConfiguration> assemblyConfigurations = getAllAssemblyConfigurations();
        Set<String> assemblyNames = new HashSet<>();
        for (AssemblyConfiguration config : assemblyConfigurations) {
            String assemblyName = config.getName();
            boolean wasElementAbsent = assemblyNames.add(assemblyName);
            if (!wasElementAbsent) {
                log.error("Multiple assemblies use the name \"%s\". Please assign each assembly a unique name.", assemblyName);
                throw new IllegalArgumentException("Assembly names must be unique");
            }
        }
    }
Use {@link #getAllAssemblyConfigurations()} unless you specifically want the configuration defined only by <code>assemblies</code>.
src/main/java/io/fabric8/maven/docker/config/BuildImageConfiguration.java