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 Summary
ConstructorsConstructorDescriptionMavenRecipeBundleLoader(org.openrewrite.ExecutionContext ctx, MavenArtifactDownloader downloader, RecipeClassLoaderFactory classLoaderFactory) -
Method Summary
Modifier and TypeMethodDescriptionorg.openrewrite.marketplace.RecipeBundlecreateBundle(String packageName, String version, @Nullable String team) @Nullable URLStreamHandlercreateURLStreamHandler(String protocol) EnablesYamlRecipeBundleLoaderto load YAML recipes from the META-INF/rewrite directory of Maven recipe artifacts.
-
Constructor Details
-
MavenRecipeBundleLoader
public MavenRecipeBundleLoader(org.openrewrite.ExecutionContext ctx, MavenArtifactDownloader downloader, RecipeClassLoaderFactory classLoaderFactory)
-
-
Method Details
-
getEcosystem
- Specified by:
getEcosystemin interfaceorg.openrewrite.marketplace.RecipeBundleLoader
-
createBundle
public org.openrewrite.marketplace.RecipeBundle createBundle(String packageName, String version, @Nullable String team) - Specified by:
createBundlein interfaceorg.openrewrite.marketplace.RecipeBundleLoader
-
createURLStreamHandler
EnablesYamlRecipeBundleLoaderto 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:
createURLStreamHandlerin interfaceURLStreamHandlerFactory- Parameters:
protocol- Adds support for the scheme "maven-rewrite-yaml".- Returns:
- A URLStreamHandler that
YamlRecipeBundleLoaderuses.
-