Remove Maven plugin goal
Recipe ID
org.openrewrite.maven.RemovePluginGoalArtifactorg.openrewrite:rewrite-mavenRemoves a goal from a Maven plugin wherever it is declared: directly under a <plugin>, inside <executions>, and within <build>, <pluginManagement>, or <profiles>. If removing the goal leaves an <execution> with no remaining goals, the execution is removed. If all executions are removed, the <executions> element is also removed.
Single recipeApache 2.0
Usage
You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.maven.RemovePluginGoal --recipe-option "pluginGroupId=org.apache.maven.plugins" --recipe-option "pluginArtifactId=maven-compiler-plugin" --recipe-option "goal=compile"If the recipe isn’t available locally, install it with:
mod config recipes jar install org.openrewrite:rewrite-maven:RELEASEOptions
| Name | Type | Description |
|---|---|---|
pluginGroupIdrequired | String | Group ID of the plugin from which the goal will be removed. Supports glob. A Group ID is the first part of a plugin coordinate 'org.apache.maven.plugins:maven-compiler-plugin:VERSION'. e.g. org.apache.maven.plugins |
pluginArtifactIdrequired | String | Artifact ID of the plugin from which the goal will be removed. Supports glob. The second part of a plugin coordinate 'org.apache.maven.plugins:maven-compiler-plugin:VERSION'. e.g. maven-compiler-plugin |
goalrequired | String | The goal to remove. Matching is case-insensitive and supports glob. e.g. compile |
Data tables
Structured output this recipe can produce.
- Source files that had resultsSource files that were modified by the recipe run.
org.openrewrite.table.SourcesFileResults - Source files that had search resultsSearch results that were found during the recipe run.
org.openrewrite.table.SearchResults - Source files that errored on a recipeThe details of all errors produced by a recipe run.
org.openrewrite.table.SourcesFileErrors - Recipe performanceStatistics used in analyzing the performance of recipes.
org.openrewrite.table.RecipeRunStats