Class AbstractRewriteBaseRunMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractRewriteDryRunMojo, AbstractRewriteRunMojo

public abstract class AbstractRewriteBaseRunMojo extends AbstractRewriteMojo
  • Field Details

    • exportDatatables

      @Parameter(property="rewrite.exportDatatables", defaultValue="false") protected boolean exportDatatables
  • Constructor Details

    • AbstractRewriteBaseRunMojo

      public AbstractRewriteBaseRunMojo()
  • Method Details

    • repositoryRoot

      protected Path repositoryRoot()
      Attempt to determine the root of the git repository for the given project. Many Gradle builds co-locate the build root with the git repository root, but that is not required. If no git repository can be located in any folder containing the build, the build root will be returned.
    • listResults

      protected AbstractRewriteBaseRunMojo.ResultsContainer listResults(org.openrewrite.ExecutionContext ctx) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • loadSourceSet

      protected org.openrewrite.LargeSourceSet loadSourceSet(Path repositoryRoot, org.openrewrite.config.Environment env, org.openrewrite.ExecutionContext ctx) throws org.apache.maven.artifact.DependencyResolutionRequiredException, org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.artifact.DependencyResolutionRequiredException
      org.apache.maven.plugin.MojoExecutionException
    • runRecipe

      protected List<org.openrewrite.Result> runRecipe(org.openrewrite.Recipe recipe, org.openrewrite.LargeSourceSet sourceSet, org.openrewrite.ExecutionContext ctx)
    • logRecipesThatMadeChanges

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

      protected Duration estimateTimeSavedSum(org.openrewrite.Result result, Duration timeSaving)
    • formatDuration

      protected String formatDuration(Duration duration)