Class MavenRecipeBundleLoader

java.lang.Object
org.openrewrite.maven.marketplace.MavenRecipeBundleLoader
All Implemented Interfaces:
URLStreamHandlerFactory, org.openrewrite.marketplace.RecipeBundleLoader

public class MavenRecipeBundleLoader extends Object implements org.openrewrite.marketplace.RecipeBundleLoader, URLStreamHandlerFactory
  • Constructor Details

  • Method Details

    • getEcosystem

      public String getEcosystem()
      Specified by:
      getEcosystem in interface org.openrewrite.marketplace.RecipeBundleLoader
    • createBundle

      public org.openrewrite.marketplace.RecipeBundle createBundle(String packageName, String version, @Nullable String team)
      Specified by:
      createBundle in interface org.openrewrite.marketplace.RecipeBundleLoader
    • createURLStreamHandler

      public @Nullable URLStreamHandler createURLStreamHandler(String protocol)
      Enables YamlRecipeBundleLoader to load YAML recipes from the META-INF/rewrite directory of Maven recipe artifacts. A recipe marketplace entry of the form "maven-rewrite-yaml:org.openrewrite:rewrite-core:8.0.0!/META-INF/rewrite/rewrite.yml" will load recipes from rewrite-core after downloading the dependency.
      Specified by:
      createURLStreamHandler in interface URLStreamHandlerFactory
      Parameters:
      protocol - Adds support for the scheme "maven-rewrite-yaml".
      Returns:
      A URLStreamHandler that YamlRecipeBundleLoader uses.