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

    Fields
    Modifier and Type
    Field
    Description
    protected org.codehaus.plexus.build.BuildContext
    Build Context.
    protected boolean
    Define if plugin must stop/fail on warnings.
    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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    After process.
    protected abstract void
    Before process.
    void
     
    protected abstract String[]
    Gets the default includes.
    protected abstract void
    Process file.

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • project

      @Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
      Maven 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 failOnWarning
      Define if plugin must stop/fail on warnings.
    • buildContext

      @Inject protected org.codehaus.plexus.build.BuildContext buildContext
      Build Context.
    • jsErrorReporter

      protected ErrorReporter4Mojo 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

      protected abstract String[] getDefaultIncludes()
      Gets the default includes.
      Returns:
      the default includes
    • beforeProcess

      protected abstract void beforeProcess() throws IOException
      Before process.
      Throws:
      IOException - the IO exception
    • afterProcess

      protected abstract void afterProcess() throws IOException
      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 exception
      org.apache.maven.plugin.MojoExecutionException - the mojo execution exception