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
Modifier and TypeFieldDescriptionprivate boolean
if false all compression is off (default is true).private String
Charset encoding for files to read and create.private String[]
Deprecated.use fileExtensionsprivate String[]
file extensions to be processed.private boolean
if false keeps XML comments (default is true).private boolean
removes iter-tag whitespace characters (default is true).private boolean
Skip run of plugin.private String
source folder where xml files are located.private String
target folder where compressed xml files will be placed.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
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.void
setEnabled
(Boolean enabled) Sets the enabled.void
setFileExt
(String[] fileExt) Deprecated.use setFileExtensionsvoid
setFileExtensions
(String[] fileExtensions) Sets the file ext.void
setRemoveComments
(Boolean removeComments) Sets the removes the comments.void
setRemoveIntertagSpaces
(Boolean removeIntertagSpaces) Sets the removes the intertag spaces.void
setSrcFolder
(String srcFolder) Sets the src folder.void
setTargetFolder
(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
-