Package org.codelibs.maven.yuicompressor
Class MojoSupport
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codelibs.maven.yuicompressor.MojoSupport
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
JSLintMojo,YuiCompressorMojo
public abstract class MojoSupport
extends org.apache.maven.plugin.AbstractMojo
Abstract base class for YUI Compressor Maven plugin mojos.
Provides common functionality for file scanning and processing.
- Author:
- David Bernard, CodeLibs Project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.sonatype.plexus.build.incremental.BuildContextprotected booleanDefine if plugin must stop/fail on warnings.protected ErrorReporter4Mojoprotected boolean[js only] Display possible errors in the code.protected org.apache.maven.project.MavenProjectFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidCalled after all processing is complete.protected abstract voidCalled before processing starts.voidexecute()protected abstract String[]Returns the default file includes pattern.protected abstract voidprocessFile(SourceFile src) Processes a single file.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(property="project", readonly=true, required=true) protected org.apache.maven.project.MavenProject project -
jswarn
@Parameter(property="maven.yuicompressor.jswarn", defaultValue="true") protected boolean jswarn[js only] Display possible errors in the code. -
failOnWarning
@Parameter(property="maven.yuicompressor.failOnWarning", defaultValue="false") protected boolean failOnWarningDefine if plugin must stop/fail on warnings. -
buildContext
@Component protected org.sonatype.plexus.build.incremental.BuildContext buildContext -
jsErrorReporter
-
-
Constructor Details
-
MojoSupport
public MojoSupport()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
getDefaultIncludes
Returns the default file includes pattern.- Returns:
- array of include patterns
- Throws:
IOException- if an error occurs
-
beforeProcess
Called before processing starts.- Throws:
IOException- if an error occurs
-
afterProcess
Called after all processing is complete.- Throws:
IOException- if an error occurs
-
processFile
Processes a single file.- Parameters:
src- the source file to process- Throws:
IOException- if an error occurs
-