Class AbstractSpotlessMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.diffplug.spotless.maven.AbstractSpotlessMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
SpotlessApplyMojo, SpotlessCheckMojo

public abstract class AbstractSpotlessMojo extends org.apache.maven.plugin.AbstractMojo
  • Field Details

    • buildContext

      @Component protected org.sonatype.plexus.build.incremental.BuildContext buildContext
    • baseDir

      @Parameter(defaultValue="${project.basedir}", required=true, readonly=true) protected File baseDir
    • m2eEnableForIncrementalBuild

      @Parameter(defaultValue="false") protected boolean m2eEnableForIncrementalBuild
      If set to true will also run on incremental builds (i.e. within Eclipse with m2e). Otherwise this goal is skipped in incremental builds and only runs on full builds.
  • Constructor Details

    • AbstractSpotlessMojo

      protected AbstractSpotlessMojo()
  • Method Details

    • process

      protected abstract void process(String name, Iterable<File> files, Formatter formatter, UpToDateChecker upToDateChecker) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • execute

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