Package org.codelibs.maven.yuicompressor
Class YuiCompressorMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codelibs.maven.yuicompressor.MojoSupport
org.codelibs.maven.yuicompressor.YuiCompressorMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="compress",
defaultPhase=PROCESS_RESOURCES,
threadSafe=true)
public class YuiCompressorMojo
extends MojoSupport
Apply YUI Compressor compression on JavaScript and CSS files.
- Author:
- David Bernard, CodeLibs Project
-
Field Summary
Fields inherited from class org.codelibs.maven.yuicompressor.MojoSupport
buildContext, failOnWarning, jsErrorReporter, jswarn, projectFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalled after all processing is complete.voidCalled before processing starts.protected String[]Returns the default file includes pattern.protected FilegzipIfRequested(File file) protected voidprocessFile(SourceFile src) Processes a single file.protected longratioOfSize(File file100, File fileX) Methods inherited from class org.codelibs.maven.yuicompressor.MojoSupport
executeMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
YuiCompressorMojo
public YuiCompressorMojo()
-
-
Method Details
-
getDefaultIncludes
Description copied from class:MojoSupportReturns the default file includes pattern.- Specified by:
getDefaultIncludesin classMojoSupport- Returns:
- array of include patterns
-
beforeProcess
Description copied from class:MojoSupportCalled before processing starts.- Specified by:
beforeProcessin classMojoSupport- Throws:
IOException- if an error occurs
-
afterProcess
Description copied from class:MojoSupportCalled after all processing is complete.- Specified by:
afterProcessin classMojoSupport- Throws:
IOException- if an error occurs
-
processFile
Description copied from class:MojoSupportProcesses a single file.- Specified by:
processFilein classMojoSupport- Parameters:
src- the source file to process- Throws:
IOException- if an error occurs
-
gzipIfRequested
- Throws:
IOException
-
ratioOfSize
-