Class XmlCompressorMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.tunyk.mvn.plugins.htmlcompressor.XmlCompressorMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="xml",
defaultPhase=COMPILE,
requiresProject=false,
threadSafe=true)
public class XmlCompressorMojo
extends org.apache.maven.plugin.AbstractMojo
Compress XML files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanif false all compression is off (default is true).private StringCharset encoding for files to read and create.private String[]Deprecated.use fileExtensionsprivate String[]file extensions to be processed.private booleanif false keeps XML comments (default is true).private booleanremoves iter-tag whitespace characters (default is true).private booleanSkip run of plugin.private Stringsource folder where xml files are located.private Stringtarget folder where compressed xml files will be placed.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Gets the enabled.String[]Deprecated.use getFileExtensionsString[]Gets the file extensions.Gets the removes the comments.Gets the removes the intertag spaces.Gets the src folder.Gets the target folder.voidsetEnabled(Boolean enabled) Sets the enabled.voidsetFileExt(String[] fileExt) Deprecated.use setFileExtensionsvoidsetFileExtensions(String[] fileExtensions) Sets the file ext.voidsetRemoveComments(Boolean removeComments) Sets the removes the comments.voidsetRemoveIntertagSpaces(Boolean removeIntertagSpaces) Sets the removes the intertag spaces.voidsetSrcFolder(String srcFolder) Sets the src folder.voidsetTargetFolder(String targetFolder) Sets the target folder.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
fileExt
Deprecated.use fileExtensionsFile extensions to be processed. -
fileExtensions
file extensions to be processed. -
enabled
@Parameter(property="htmlcompressor.enabled", defaultValue="true") private boolean enabledif false all compression is off (default is true). -
skip
@Parameter(defaultValue="false", alias="skip", property="skip") private boolean skipSkip run of plugin. -
removeComments
@Parameter(property="htmlcompressor.removeComments", defaultValue="true") private boolean removeCommentsif false keeps XML comments (default is true). -
removeIntertagSpaces
@Parameter(property="htmlcompressor.removeIntertagSpaces", defaultValue="true") private boolean removeIntertagSpacesremoves iter-tag whitespace characters (default is true). -
srcFolder
@Parameter(property="htmlcompressor.srcFolder", defaultValue="${project.basedir}/src/main/resources") private String srcFoldersource folder where xml files are located. -
targetFolder
@Parameter(property="htmlcompressor.targetFolder", defaultValue="${project.build.directory}/classes") private String targetFoldertarget folder where compressed xml files will be placed. -
encoding
Charset encoding for files to read and create.
-
-
Constructor Details
-
XmlCompressorMojo
public XmlCompressorMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getFileExt
Deprecated.use getFileExtensionsGets the file ext.- Returns:
- the file ext
-
setFileExt
Deprecated.use setFileExtensionsSets the file ext.- Parameters:
fileExt- the new file ext
-
getFileExtensions
-
setFileExtensions
Sets the file ext.- Parameters:
fileExtensions- the new file extensions
-
getEnabled
-
setEnabled
-
getRemoveComments
-
setRemoveComments
Sets the removes the comments.- Parameters:
removeComments- the new removes the comments
-
getRemoveIntertagSpaces
Gets the removes the intertag spaces.- Returns:
- the removes the intertag spaces
-
setRemoveIntertagSpaces
Sets the removes the intertag spaces.- Parameters:
removeIntertagSpaces- the new removes the intertag spaces
-
getSrcFolder
-
setSrcFolder
Sets the src folder.- Parameters:
srcFolder- the new src folder
-
getTargetFolder
-
setTargetFolder
Sets the target folder.- Parameters:
targetFolder- the new target folder
-