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 Details

    • fileExt

      @Deprecated @Parameter(property="htmlcompressor.fileExt") private String[] fileExt
      Deprecated.
      use fileExtensions
      File extensions to be processed.
    • fileExtensions

      @Parameter(property="htmlcompressor.fileExtensions") private String[] fileExtensions
      file extensions to be processed.
    • enabled

      @Parameter(property="htmlcompressor.enabled", defaultValue="true") private boolean enabled
      if false all compression is off (default is true).
    • skip

      @Parameter(defaultValue="false", alias="skip", property="skip") private boolean skip
      Skip run of plugin.
    • removeComments

      @Parameter(property="htmlcompressor.removeComments", defaultValue="true") private boolean removeComments
      if false keeps XML comments (default is true).
    • removeIntertagSpaces

      @Parameter(property="htmlcompressor.removeIntertagSpaces", defaultValue="true") private boolean removeIntertagSpaces
      removes iter-tag whitespace characters (default is true).
    • srcFolder

      @Parameter(property="htmlcompressor.srcFolder", defaultValue="${project.basedir}/src/main/resources") private String srcFolder
      source folder where xml files are located.
    • targetFolder

      @Parameter(property="htmlcompressor.targetFolder", defaultValue="${project.build.directory}/classes") private String targetFolder
      target folder where compressed xml files will be placed.
    • encoding

      @Parameter(property="htmlcompressor.encoding", defaultValue="UTF-8") private String 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 public String[] getFileExt()
      Deprecated.
      use getFileExtensions
      Gets the file ext.
      Returns:
      the file ext
    • setFileExt

      @Deprecated public void setFileExt(String[] fileExt)
      Deprecated.
      use setFileExtensions
      Sets the file ext.
      Parameters:
      fileExt - the new file ext
    • getFileExtensions

      public String[] getFileExtensions()
      Gets the file extensions.
      Returns:
      the file extensions
    • setFileExtensions

      public void setFileExtensions(String[] fileExtensions)
      Sets the file ext.
      Parameters:
      fileExtensions - the new file extensions
    • getEnabled

      public Boolean getEnabled()
      Gets the enabled.
      Returns:
      the enabled
    • setEnabled

      public void setEnabled(Boolean enabled)
      Sets the enabled.
      Parameters:
      enabled - the new enabled
    • getRemoveComments

      public Boolean getRemoveComments()
      Gets the removes the comments.
      Returns:
      the removes the comments
    • setRemoveComments

      public void setRemoveComments(Boolean removeComments)
      Sets the removes the comments.
      Parameters:
      removeComments - the new removes the comments
    • getRemoveIntertagSpaces

      public Boolean getRemoveIntertagSpaces()
      Gets the removes the intertag spaces.
      Returns:
      the removes the intertag spaces
    • setRemoveIntertagSpaces

      public void setRemoveIntertagSpaces(Boolean removeIntertagSpaces)
      Sets the removes the intertag spaces.
      Parameters:
      removeIntertagSpaces - the new removes the intertag spaces
    • getSrcFolder

      public String getSrcFolder()
      Gets the src folder.
      Returns:
      the src folder
    • setSrcFolder

      public void setSrcFolder(String srcFolder)
      Sets the src folder.
      Parameters:
      srcFolder - the new src folder
    • getTargetFolder

      public String getTargetFolder()
      Gets the target folder.
      Returns:
      the target folder
    • setTargetFolder

      public void setTargetFolder(String targetFolder)
      Sets the target folder.
      Parameters:
      targetFolder - the new target folder