Package au.com.acegi.xmlformat
Class AbstractXmlPlugin
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- au.com.acegi.xmlformat.AbstractXmlPlugin
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
XmlCheckPlugin,XmlFormatPlugin
public abstract class AbstractXmlPlugin extends org.apache.maven.plugin.AbstractMojoCommon infrastructure for the various plugin goals.
-
-
Constructor Summary
Constructors Constructor Description AbstractXmlPlugin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidafterAllProcessed(boolean neededFormatting)Invoked after all files in the project have been processed.voidexecute()protected abstract booleanprocessFile(File input, org.dom4j.io.OutputFormat fmt)Processes a single file found in the project.
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
processFile
protected abstract boolean processFile(File input, org.dom4j.io.OutputFormat fmt) throws org.dom4j.DocumentException, IOException
Processes a single file found in the project.- Parameters:
input- the file to processfmt- the formatting options- Returns:
- true if the file required changes to match the formatting style
- Throws:
org.dom4j.DocumentException- if input XML could not be parsedIOException- if output XML stream could not be written
-
afterAllProcessed
protected abstract void afterAllProcessed(boolean neededFormatting) throws org.apache.maven.plugin.MojoExecutionExceptionInvoked after all files in the project have been processed.- Parameters:
neededFormatting- whether any processed file required changes to match the formatting style- Throws:
org.apache.maven.plugin.MojoExecutionException- if the build must be failed
-
-