Add an annotation processor to maven-compiler-plugin
Recipe ID
org.openrewrite.maven.AddAnnotationProcessorArtifact
org.openrewrite:rewrite-mavenAdd an annotation processor path to the maven-compiler-plugin configuration. For modules with an in-reactor parent, adds to the parent's build/pluginManagement/plugins section. For modules without a parent or with a parent outside the reactor, adds directly to build/plugins. Updates the annotation processor version if a newer version is specified.
Usage
You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.maven.AddAnnotationProcessor --recipe-option "groupId=org.projectlombok" --recipe-option "artifactId=lombok-mapstruct-binding" --recipe-option "version=0.2.0"If the recipe isn’t available locally, install it with:
mod config recipes jar install org.openrewrite:rewrite-maven:8.88.0Options
| Name | Type | Description |
|---|---|---|
groupIdrequired | String | The first part of the coordinate 'org.projectlombok:lombok-mapstruct-binding:0.2.0' of the processor to add. e.g. org.projectlombok |
artifactIdrequired | String | The second part of a coordinate 'org.projectlombok:lombok-mapstruct-binding:0.2.0' of the processor to add. e.g. lombok-mapstruct-binding |
versionrequired | String | The third part of a coordinate 'org.projectlombok:lombok-mapstruct-binding:0.2.0' of the processor to add. Note that an exact version is expected e.g. 0.2.0 |
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