Class TidyMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.tidy.TidyMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
CheckMojo, PomMojo

public abstract class TidyMojo extends org.apache.maven.plugin.AbstractMojo
An abstract base class for Mojos of the Tidy plugin. Handles common configuration issues and provides the POM as String.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.maven.project.MavenProject
    The Maven Project.
    protected boolean
    Set this to 'true' to skip execution.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected abstract void
    Perform whatever build-process behavior this Mojo implements using the specified POM.
    protected File
    Returns the file of the POM.
    protected String
    tidy(String pom)
    Tidy the given POM.

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • project

      @Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject project
      The Maven Project.
    • skip

      @Parameter(property="tidy.skip", defaultValue="false") protected boolean skip
      Set this to 'true' to skip execution.
  • Constructor Details

    • TidyMojo

      public TidyMojo()
  • Method Details

    • executeForPom

      protected abstract void executeForPom(String pom) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Perform whatever build-process behavior this Mojo implements using the specified POM.
      Parameters:
      pom - the project's POM.
      Throws:
      org.apache.maven.plugin.MojoExecutionException - if an unexpected problem occurs. Throwing this exception causes a "BUILD ERROR" message to be displayed.
      org.apache.maven.plugin.MojoFailureException - if an expected problem (such as a compilation failure) occurs. Throwing this exception causes a "BUILD FAILURE" message to be displayed.
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • getPomFile

      protected File getPomFile()
      Returns the file of the POM.
    • tidy

      protected String tidy(String pom) throws org.apache.maven.plugin.MojoExecutionException
      Tidy the given POM.
      Throws:
      org.apache.maven.plugin.MojoExecutionException