net_alchim31_maven_yuicompressor
Class MojoSupport

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by 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.

Author:
David Bernard

Field Summary
protected  boolean failOnWarning
          define if plugin must stop/fail on warnings.
protected  ErrorReporter4Mojo jsErrorReporter_
           
protected  boolean jswarn
          [js only] Display possible errors in the code
protected  org.apache.maven.project.MavenProject project
           
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
MojoSupport()
           
 
Method Summary
protected abstract  void afterProcess()
           
protected abstract  void beforeProcess()
           
 void execute()
           
protected abstract  String[] getDefaultIncludes()
           
protected  void processDir(File srcRoot, File destRoot, List<String> srcExcludes, boolean destAsSource)
          Force to use defaultIncludes (ignore srcIncludes) to avoid processing resources/includes from other type than *.css or *.js
protected abstract  void processFile(SourceFile src)
           
 
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 Detail

project

protected org.apache.maven.project.MavenProject project

jswarn

protected boolean jswarn
[js only] Display possible errors in the code


failOnWarning

protected boolean failOnWarning
define if plugin must stop/fail on warnings.


jsErrorReporter_

protected ErrorReporter4Mojo jsErrorReporter_
Constructor Detail

MojoSupport

public MojoSupport()
Method Detail

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()
                                        throws Exception
Throws:
Exception

beforeProcess

protected abstract void beforeProcess()
                               throws Exception
Throws:
Exception

afterProcess

protected abstract void afterProcess()
                              throws Exception
Throws:
Exception

processDir

protected void processDir(File srcRoot,
                          File destRoot,
                          List<String> srcExcludes,
                          boolean destAsSource)
                   throws Exception
Force to use defaultIncludes (ignore srcIncludes) to avoid processing resources/includes from other type than *.css or *.js

Throws:
Exception
See Also:
https://github.com/davidB/yuicompressor-maven-plugin/issues/19

processFile

protected abstract void processFile(SourceFile src)
                             throws Exception
Throws:
Exception


Copyright © 2010-2012 Alchim31. All Rights Reserved.