Class InitMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="init", threadSafe=true) @Execute public class InitMojo extends AbstractRewriteMojo
Add rewrite-maven-plugin (or any other plugin) to the project.
For example:
./mvnw rewrite:init -DactiveRecipes=org.openrewrite.java.spring.boot2.SpringBoot1To2Migration -Ddependencies=org.openrewrite.recipe:rewrite-spring:4.17.0
  • Field Details

    • groupId

      @Parameter(property="groupId", defaultValue="org.openrewrite.maven") protected String groupId
    • artifactId

      @Parameter(property="artifactId", defaultValue="rewrite-maven-plugin") protected String artifactId
    • version

      @Parameter(property="version") @Nullable protected String version
    • configuration

      @Parameter(property="configuration") @Nullable protected String configuration
    • dependencies

      @Parameter(property="dependencies") @Nullable protected String dependencies
    • executionPhase

      @Parameter(property="executionPhase") @Nullable protected String executionPhase
    • executionGoals

      @Parameter(property="executionGoals") @Nullable protected String executionGoals
    • rootOnly

      @Parameter(property="rootOnly", defaultValue="true") protected boolean rootOnly
  • Constructor Details

    • InitMojo

      public InitMojo()
  • Method Details

    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getVersion

      protected String getVersion()
    • getConfiguration

      @Nullable protected String getConfiguration()
    • getExecutions

      @Nullable protected String getExecutions()