Package org.openrewrite.maven
Class AbstractRewriteBaseRunMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.openrewrite.maven.ConfigurableRewriteMojo
org.openrewrite.maven.AbstractRewriteMojo
org.openrewrite.maven.AbstractRewriteBaseRunMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractRewriteDryRunMojo,AbstractRewriteRunMojo
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.openrewrite.maven.ConfigurableRewriteMojo
ConfigurableRewriteMojo.State -
Field Summary
FieldsFields inherited from class org.openrewrite.maven.AbstractRewriteMojo
project, repositorySystem, resolvePropertiesInYaml, runtime, settingsDecrypterFields inherited from class org.openrewrite.maven.ConfigurableRewriteMojo
activeRecipes, activeStyles, checkstyleConfigFile, checkstyleDetectionEnabled, configLocation, failOnInvalidActiveRecipes, mavenSession, metricsPassword, metricsUri, metricsUsername, pluginDescriptor, pomCacheDirectory, pomCacheEnabled, rewriteSkip, runPerSubmodule, sizeThresholdMb, skipMavenParsingFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DurationestimateTimeSavedSum(org.openrewrite.Result result, Duration timeSaving) protected StringformatDuration(Duration duration) listResults(org.openrewrite.ExecutionContext ctx) protected org.openrewrite.LargeSourceSetloadSourceSet(Path repositoryRoot, org.openrewrite.config.Environment env, org.openrewrite.ExecutionContext ctx) protected voidlogRecipesThatMadeChanges(org.openrewrite.Result result) protected PathAttempt to determine the root of the git repository for the given project.protected List<org.openrewrite.Result>runRecipe(org.openrewrite.Recipe recipe, org.openrewrite.LargeSourceSet sourceSet, org.openrewrite.ExecutionContext ctx) Methods inherited from class org.openrewrite.maven.AbstractRewriteMojo
environment, environment, executionContext, getBuildRoot, getRecipeArtifactCoordinatesClassloaderMethods inherited from class org.openrewrite.maven.ConfigurableRewriteMojo
allProjectsMarked, getActiveRecipes, getActiveStyles, getExclusions, getPlainTextMasks, getRecipeArtifactCoordinates, loadStyles, putStateMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
exportDatatables
@Parameter(property="rewrite.exportDatatables", defaultValue="false") protected boolean exportDatatables -
options
-
-
Constructor Details
-
AbstractRewriteBaseRunMojo
public AbstractRewriteBaseRunMojo()
-
-
Method Details
-
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.DependencyResolutionRequiredExceptionorg.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
-
formatDuration
-