@Override
    public void execute() throws MojoExecutionException {
        var originalJar = project.getArtifact().getFile();
        var shadedJar = shadedJarFile();

        var req = new ShadeRequest();
        req.setJars(Set.of(originalJar));
        req.setUberJar(shadedJar);
        req.setResourceTransformers(List.of(new ProvidedArtifactsManifestUpdater()));
        req.setRelocators(List.of());
        req.setFilters(List.of());

        try {
            new DefaultShader().shade(req);
        } catch (IOException e) {
            throw new MojoExecutionException(e);
        }
        try {
            getLog().info("Replacing original jar with transformed jar");
            FileUtils.copyFile(shadedJar, originalJar);
        } catch (IOException e) {
            throw new MojoExecutionException(e);
        }
    }
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