Package au.com.acegi.xmlformat
Class XmlCheckPlugin
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- au.com.acegi.xmlformat.AbstractXmlPlugin
-
- au.com.acegi.xmlformat.XmlCheckPlugin
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="xml-check", defaultPhase=PROCESS_SOURCES) public final class XmlCheckPlugin extends AbstractXmlPluginFinds the XML files in a project and only check them: no files are changed, but the build will fail if any file does not follow the formatting conventions.
-
-
Constructor Summary
Constructors Constructor Description XmlCheckPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterAllProcessed(boolean neededFormatting)Invoked after all files in the project have been processed.protected booleanprocessFile(File input, org.dom4j.io.OutputFormat fmt)Processes a single file found in the project.-
Methods inherited from class au.com.acegi.xmlformat.AbstractXmlPlugin
execute
-
-
-
-
Method Detail
-
processFile
protected boolean processFile(File input, org.dom4j.io.OutputFormat fmt) throws org.dom4j.DocumentException, IOException
Description copied from class:AbstractXmlPluginProcesses a single file found in the project.- Specified by:
processFilein classAbstractXmlPlugin- 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 void afterAllProcessed(boolean neededFormatting) throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractXmlPluginInvoked after all files in the project have been processed.- Specified by:
afterAllProcessedin classAbstractXmlPlugin- 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
-
-