Package org.openrewrite.maven
Class ConfigurableRewriteMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.openrewrite.maven.ConfigurableRewriteMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractRewriteMojo
public abstract class ConfigurableRewriteMojo
extends org.apache.maven.plugin.AbstractMojo
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable LinkedHashSet<String>protected @Nullable LinkedHashSet<String>protected @Nullable Stringprotected @org.openrewrite.internal.lang.Nullable booleanprotected Stringprotected booleanWhether to throw an exception if an activeRecipe fails configuration validation.protected org.apache.maven.execution.MavenSessionprotected @Nullable Stringprotected @Nullable Stringprotected @Nullable Stringprotected org.apache.maven.plugin.descriptor.PluginDescriptorprotected @Nullable Stringprotected booleanprotected booleanprotected booleanprotected @org.openrewrite.internal.lang.Nullable intprotected booleanWhen enabled, skip parsing Maven `pom.xml`s, and any transitive poms, as source files.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected List<org.openrewrite.style.NamedStyles>loadStyles(org.apache.maven.project.MavenProject project, org.openrewrite.config.Environment env) protected voidMethods 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
-
configLocation
@Parameter(property="rewrite.configLocation", alias="configLocation", defaultValue="${maven.multiModuleProjectDirectory}/rewrite.yml") protected String configLocation -
activeRecipes
@Nullable @Parameter(property="rewrite.activeRecipes") protected @Nullable LinkedHashSet<String> activeRecipes -
activeStyles
@Nullable @Parameter(property="rewrite.activeStyles") protected @Nullable LinkedHashSet<String> activeStyles -
metricsUri
@Nullable @Parameter(property="rewrite.metricsUri", alias="metricsUri") protected @Nullable String metricsUri -
metricsUsername
@Nullable @Parameter(property="rewrite.metricsUsername", alias="metricsUsername") protected @Nullable String metricsUsername -
metricsPassword
@Nullable @Parameter(property="rewrite.metricsPassword", alias="metricsPassword") protected @Nullable String metricsPassword -
pomCacheEnabled
@Parameter(property="rewrite.pomCacheEnabled", alias="pomCacheEnabled", defaultValue="true") protected boolean pomCacheEnabled -
pomCacheDirectory
@Nullable @Parameter(property="rewrite.pomCacheDirectory", alias="pomCacheDirectory") protected @Nullable String pomCacheDirectory -
rewriteSkip
@Parameter(property="rewrite.skip", defaultValue="false") protected boolean rewriteSkip -
skipMavenParsing
@Parameter(property="skipMavenParsing", defaultValue="false") protected boolean skipMavenParsingWhen enabled, skip parsing Maven `pom.xml`s, and any transitive poms, as source files. This can be an efficiency improvement in certain situations. -
checkstyleConfigFile
@Nullable @Parameter(property="rewrite.checkstyleConfigFile", alias="checkstyleConfigFile") protected @Nullable String checkstyleConfigFile -
checkstyleDetectionEnabled
@Nullable @Parameter(property="rewrite.checkstyleDetectionEnabled", alias="checkstyleDetectionEnabled", defaultValue="true") protected @org.openrewrite.internal.lang.Nullable boolean checkstyleDetectionEnabled -
sizeThresholdMb
@Nullable @Parameter(property="sizeThresholdMb", defaultValue="10") protected @org.openrewrite.internal.lang.Nullable int sizeThresholdMb -
failOnInvalidActiveRecipes
@Parameter(property="rewrite.failOnInvalidActiveRecipes", alias="failOnInvalidActiveRecipes", defaultValue="false") protected boolean failOnInvalidActiveRecipesWhether to throw an exception if an activeRecipe fails configuration validation. This may happen if the activeRecipe is improperly configured, or any downstream recipes are improperly configured.For the time, this default is "false" to prevent one improperly recipe from failing the build. In the future, this default may be changed to "true" to be more restrictive.
-
runPerSubmodule
@Parameter(property="rewrite.runPerSubmodule", alias="runPerSubmodule", defaultValue="false") protected boolean runPerSubmodule -
mavenSession
@Parameter(defaultValue="${session}", readonly=true) protected org.apache.maven.execution.MavenSession mavenSession -
pluginDescriptor
@Parameter(defaultValue="${plugin}", required=true, readonly=true) protected org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor
-
-
Constructor Details
-
ConfigurableRewriteMojo
public ConfigurableRewriteMojo()
-
-
Method Details
-
getExclusions
-
getPlainTextMasks
-
putState
-
allProjectsMarked
protected boolean allProjectsMarked() -
getActiveRecipes
-
getActiveStyles
-
loadStyles
protected List<org.openrewrite.style.NamedStyles> loadStyles(org.apache.maven.project.MavenProject project, org.openrewrite.config.Environment env) -
getRecipeArtifactCoordinates
-