ro.isdc.wro.maven.plugin
Class AbstractWro4jMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by ro.isdc.wro.maven.plugin.AbstractWro4jMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractSingleProcessorMojo, Wro4jMojo

public abstract class AbstractWro4jMojo
extends org.apache.maven.plugin.AbstractMojo

Defines most common properties used by wro4j build-time solution infrastructure.

Author:
Alex Objelean

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractWro4jMojo()
           
 
Method Summary
protected abstract  void doExecute()
          Perform actual plugin processing.
 void execute()
          
protected  void extendPluginClasspath()
          Update the classpath.
protected  WroManagerFactory getManagerFactory()
          This method will ensure that you have a right and initialized instance of StandaloneContextAware.
protected  List<String> getTargetGroupsAsList()
           
protected  boolean isIncrementalBuild()
           
protected  WroManagerFactory newWroManagerFactory()
          
protected  void onAfterExecute()
          Invoked right after execution completion.
protected  void onBeforeExecute()
          Invoked before execution is performed.
protected  void validate()
          Checks if all required fields are configured.
 
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
 

Constructor Detail

AbstractWro4jMojo

public AbstractWro4jMojo()
Method Detail

execute

public final void execute()
                   throws org.apache.maven.plugin.MojoExecutionException

Throws:
org.apache.maven.plugin.MojoExecutionException

onBeforeExecute

protected void onBeforeExecute()
Invoked before execution is performed.


onAfterExecute

protected void onAfterExecute()
Invoked right after execution completion. This method is invoked also if the execution failed with an exception.


doExecute

protected abstract void doExecute()
                           throws Exception
Perform actual plugin processing.

Throws:
Exception

getManagerFactory

protected WroManagerFactory getManagerFactory()
This method will ensure that you have a right and initialized instance of StandaloneContextAware. When overriding this method, ensure that creating managerFactory performs injection during manager creation, otherwise the manager won't be initialized porperly.

Returns:
WroManagerFactory implementation.

newWroManagerFactory

protected WroManagerFactory newWroManagerFactory()
                                          throws org.apache.maven.plugin.MojoExecutionException

Throws:
org.apache.maven.plugin.MojoExecutionException

getTargetGroupsAsList

protected final List<String> getTargetGroupsAsList()
                                            throws Exception
Returns:
a list of groups which will be processed.
Throws:
Exception

isIncrementalBuild

protected final boolean isIncrementalBuild()

validate

protected void validate()
                 throws org.apache.maven.plugin.MojoExecutionException
Checks if all required fields are configured.

Throws:
org.apache.maven.plugin.MojoExecutionException

extendPluginClasspath

protected final void extendPluginClasspath()
                                    throws org.apache.maven.plugin.MojoExecutionException
Update the classpath.

Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2008-2013. All Rights Reserved.