Package org.codehaus.mojo.tidy
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
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
FieldsModifier and TypeFieldDescriptionprotected 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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
protected abstract void
executeForPom
(String pom) Perform whatever build-process behavior thisMojo
implements using the specified POM.protected File
Returns the file of the POM.protected String
Tidy the given POM.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject projectThe Maven Project. -
skip
@Parameter(property="tidy.skip", defaultValue="false") protected boolean skipSet 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 thisMojo
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
Returns the file of the POM. -
tidy
Tidy the given POM.- Throws:
org.apache.maven.plugin.MojoExecutionException
-