@SuppressWarnings("deprecation")
        @Override
        public void processResource(String resource, InputStream is, List<Relocator> relocators) throws IOException {
            manifest = new Manifest(is);
            Attributes attributes = manifest.getMainAttributes();
            var providedArtifacts = attributes.getValue("Class-Path");
            if (providedArtifacts == null) return;

            attributes.remove(new Attributes.Name("Class-Path"));
            attributes.putValue(PROVIDED_ARTIFACTS_MANIFEST_ENTRY, providedArtifacts.replace(" ", ","));
            attributes.putValue("Created-By", "vespa container maven plugin");
        }
Replaces the Class-Path of a jar file manifest with a list of provided artifacts in a new manifest entry.
The Class-Path is used as input because it is trivial to generate with the maven-jar-plugin.

@author gjoranv
bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateProvidedArtifactManifestMojo.java