class CycloneDXGenerator extends AbstractGenerator {

    @Override
    public Map<String, IAttachable> produce(Collection<Artifact> artifacts) throws ExecutionException {
        LOG.debug("Created a cyclone-dx bill-of-material for {} artifacts", artifacts.size());
        List<Component> components = toComponents(artifacts);
        Bom bom = new Bom();
        bom.setComponents(components);
        BomGenerator gen = BomGeneratorFactory.create(CycloneDxSchema.Version.VERSION_11, bom);
        File targetFile = createTargetFile();
        doGenerate(gen, targetFile);
        LOG.debug("Bill-of-material created in {}", targetFile);
        return Collections.singletonMap("cyclonedx-bom", new Attachable("xml", "cyclonedx-bom", targetFile));
    }

}