Package net.alchim31.maven.yuicompressor
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 net.alchim31.maven.yuicompressor.MojoSupport
buildContext, failOnWarning, jsErrorReporter, jswarn, project
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
After process.void
Before process.protected String[]
Gets the default includes.protected File
gzipIfRequested
(File file) Gzip if requested.protected void
processFile
(SourceFile src) Process file.protected long
ratioOfSize
(File file100, File fileX) Ratio of size.Methods inherited from class net.alchim31.maven.yuicompressor.MojoSupport
execute
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
YuiCompressorMojo
public YuiCompressorMojo()
-
-
Method Details
-
getDefaultIncludes
Description copied from class:MojoSupport
Gets the default includes.- Specified by:
getDefaultIncludes
in classMojoSupport
- Returns:
- the default includes
-
beforeProcess
Description copied from class:MojoSupport
Before process.- Specified by:
beforeProcess
in classMojoSupport
- Throws:
IOException
- the IO exception
-
afterProcess
Description copied from class:MojoSupport
After process.- Specified by:
afterProcess
in classMojoSupport
- Throws:
IOException
- the IO exception
-
processFile
protected void processFile(SourceFile src) throws IOException, org.apache.maven.plugin.MojoExecutionException Description copied from class:MojoSupport
Process file.- Specified by:
processFile
in 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
Ratio of size.- Parameters:
file100
- the file 100fileX
- the file X- Returns:
- the long
-