Package org.openrewrite.maven
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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.maven.execution.MavenSessionprotected org.apache.maven.project.MavenProjectprotected org.apache.maven.repository.RepositorySystemprotected org.apache.maven.rtinfo.RuntimeInformationprotected org.apache.maven.settings.crypto.SettingsDecrypterFields inherited from class org.openrewrite.maven.ConfigurableRewriteMojo
checkstyleConfigFile, failOnInvalidActiveRecipes, metricsPassword, metricsUri, metricsUsername, pomCacheDirectory, pomCacheEnabled, runPerSubmodule, sizeThresholdMb, skipMavenParsingFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.openrewrite.config.Environmentprotected org.openrewrite.ExecutionContextprotected Pathprotected URLClassLoaderstatic org.openrewrite.config.RecipeDescriptorgetRecipeDescriptor(String recipe, Collection<org.openrewrite.config.RecipeDescriptor> recipeDescriptors) protected AbstractRewriteMojo.ResultsContainerprotected voidlogRecipesThatMadeChanges(org.openrewrite.Result result) Methods inherited from class org.openrewrite.maven.ConfigurableRewriteMojo
getActiveRecipes, getActiveStyles, getExclusions, getRecipeArtifactCoordinatesMethods 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
-
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
-
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
-