Class YuiCompressorMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.alchim31.maven.yuicompressor.MojoSupport
net.alchim31.maven.yuicompressor.YuiCompressorMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="compress",
defaultPhase=PROCESS_RESOURCES,
requiresProject=true,
threadSafe=true)
public class YuiCompressorMojo
extends MojoSupport
Apply compression on JS and CSS (using YUI Compressor).
-
Field Summary
Fields inherited from class MojoSupport
buildContext, failOnWarning, jsErrorReporter, jswarn, projectFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAfter process.voidBefore process.protected String[]Gets the default includes.protected FilegzipIfRequested(File file) Gzip if requested.protected voidprocessFile(SourceFile src) Process file.protected longratioOfSize(File file100, File fileX) Ratio of size.Methods inherited from class 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:MojoSupportGets the default includes.- Specified by:
getDefaultIncludesin classMojoSupport- Returns:
- the default includes
-
beforeProcess
Description copied from class:MojoSupportBefore process.- Specified by:
beforeProcessin classMojoSupport- Throws:
IOException- the IO exception
-
afterProcess
Description copied from class:MojoSupportAfter process.- Specified by:
afterProcessin classMojoSupport- Throws:
IOException- the IO exception
-
processFile
protected void processFile(SourceFile src) throws IOException, org.apache.maven.plugin.MojoExecutionException Description copied from class:MojoSupportProcess file.- Specified by:
processFilein classMojoSupport- Parameters:
src- the src- Throws:
IOException- the IO exceptionorg.apache.maven.plugin.MojoExecutionException- the mojo execution exception
-
gzipIfRequested
Gzip if requested.- Parameters:
file- the file- Returns:
- the file
- Throws:
IOException- the IO exception
-
ratioOfSize
-