Package net.alchim31.maven.yuicompressor
Class MojoSupport
java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.alchim31.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
Common class for mojos.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.codehaus.plexus.build.BuildContext
Build Context.protected boolean
Define if plugin must stop/fail on warnings.protected ErrorReporter4Mojo
The js error reporter.protected boolean
[js only] Display possible errors in the code.protected org.apache.maven.project.MavenProject
Maven Project.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
After process.protected abstract void
Before process.void
execute()
protected abstract String[]
Gets the default includes.protected abstract void
processFile
(SourceFile src) Process file.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject projectMaven Project. -
jswarn
@Parameter(defaultValue="true", property="maven.yuicompressor.jswarn") protected boolean jswarn[js only] Display possible errors in the code. -
failOnWarning
@Parameter(defaultValue="false", property="maven.yuicompressor.failOnWarning") protected boolean failOnWarningDefine if plugin must stop/fail on warnings. -
buildContext
@Inject protected org.codehaus.plexus.build.BuildContext buildContextBuild Context. -
jsErrorReporter
The js error reporter.
-
-
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.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
getDefaultIncludes
Gets the default includes.- Returns:
- the default includes
-
beforeProcess
Before process.- Throws:
IOException
- the IO exception
-
afterProcess
After process.- Throws:
IOException
- the IO exception
-
processFile
protected abstract void processFile(SourceFile src) throws IOException, org.apache.maven.plugin.MojoExecutionException Process file.- Parameters:
src
- the src- Throws:
IOException
- the IO exceptionorg.apache.maven.plugin.MojoExecutionException
- the mojo execution exception
-