Class AbstractRewriteMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.openrewrite.maven.ConfigurableRewriteMojo
org.openrewrite.maven.AbstractRewriteMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractRewriteDryRunMojo, AbstractRewriteRunMojo, ConfigureMojo, CycloneDxBomMojo, InitMojo, RemoveMojo, RewriteDiscoverMojo

public abstract class AbstractRewriteMojo extends ConfigurableRewriteMojo
  • Field Details

    • project

      @Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
    • runtime

      @Component protected org.apache.maven.rtinfo.RuntimeInformation runtime
    • settingsDecrypter

      @Component protected org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter
    • repositorySystem

      @Component protected org.apache.maven.repository.RepositorySystem repositorySystem
    • mavenSession

      @Parameter(defaultValue="${session}", readonly=true) protected org.apache.maven.execution.MavenSession mavenSession
  • Constructor Details

    • AbstractRewriteMojo

      public AbstractRewriteMojo()
  • Method Details

    • environment

      protected org.openrewrite.config.Environment environment() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • executionContext

      protected org.openrewrite.ExecutionContext executionContext()
    • getBaseDir

      protected Path getBaseDir()
    • listResults

      protected AbstractRewriteMojo.ResultsContainer listResults() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getRecipeClassloader

      protected URLClassLoader getRecipeClassloader() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • logRecipesThatMadeChanges

      protected void logRecipesThatMadeChanges(org.openrewrite.Result result)
    • getRecipeDescriptor

      public static org.openrewrite.config.RecipeDescriptor getRecipeDescriptor(String recipe, Collection<org.openrewrite.config.RecipeDescriptor> recipeDescriptors) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException