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.
 java.io.File getContextFolder()
           
protected  StandaloneContextAwareManagerFactory getManagerFactory()
          This method will ensure that you have a right and initialized instance of StandaloneContextAwareManagerFactory.
 java.lang.String getTargetGroups()
           
protected  java.util.List<java.lang.String> getTargetGroupsAsList()
           
 java.io.File getWroFile()
           
 boolean isIgnoreMissingResources()
           
 boolean isMinimize()
           
protected  StandaloneContextAwareManagerFactory newWroManagerFactory()
          
 void setContextFolder(java.io.File contextFolder)
           
 void setExtraConfigFile(java.io.File extraConfigFile)
           
 void setIgnoreMissingResources(boolean ignoreMissingResources)
           
 void setMinimize(boolean minimize)
           
 void setTargetGroups(java.lang.String targetGroups)
           
 void setWroFile(java.io.File wroFile)
           
 void setWroManagerFactory(java.lang.String wroManagerFactory)
           
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

doExecute

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

Throws:
java.lang.Exception

getManagerFactory

protected StandaloneContextAwareManagerFactory getManagerFactory()
                                                          throws java.lang.Exception
This method will ensure that you have a right and initialized instance of StandaloneContextAwareManagerFactory.

Returns:
WroManagerFactory implementation.
Throws:
java.lang.Exception

newWroManagerFactory

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

Throws:
org.apache.maven.plugin.MojoExecutionException

getTargetGroupsAsList

protected final java.util.List<java.lang.String> getTargetGroupsAsList()
                                                                throws java.lang.Exception
Returns:
a list containing all groups needs to be processed.
Throws:
java.lang.Exception

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

setContextFolder

public void setContextFolder(java.io.File contextFolder)
Parameters:
contextFolder - the servletContextFolder to set

setWroFile

public void setWroFile(java.io.File wroFile)
Parameters:
wroFile - the wroFile to set

getWroFile

public java.io.File getWroFile()
Returns:
the wroFile

getContextFolder

public java.io.File getContextFolder()
Returns:
the contextFolder

setMinimize

public void setMinimize(boolean minimize)
Parameters:
minimize - flag for minimization.

setIgnoreMissingResources

public void setIgnoreMissingResources(boolean ignoreMissingResources)
Parameters:
ignoreMissingResources - the ignoreMissingResources to set

isMinimize

public boolean isMinimize()
Returns:
the minimize

isIgnoreMissingResources

public boolean isIgnoreMissingResources()
Returns:
the ignoreMissingResources

getTargetGroups

public java.lang.String getTargetGroups()
Returns:
the targetGroups

setTargetGroups

public void setTargetGroups(java.lang.String targetGroups)
Parameters:
versionEncoder(targetGroups) - comma separated group names.

setWroManagerFactory

public void setWroManagerFactory(java.lang.String wroManagerFactory)
Parameters:
wroManagerFactory - to set

setExtraConfigFile

public void setExtraConfigFile(java.io.File extraConfigFile)
Parameters:
extraConfigFile - the extraConfigFile to set


Copyright © 2008-2011. All Rights Reserved.