Package ro.isdc.wro.maven.plugin
Class AbstractWro4jMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- 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.AbstractMojoDefines most common properties used by wro4j build-time solution infrastructure.- Author:
- Alex Objelean
-
-
Constructor Summary
Constructors Constructor Description AbstractWro4jMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoExecute()Perform actual plugin processing.voidexecute()protected voidextendPluginClasspath()Update the classpath.protected ro.isdc.wro.manager.factory.WroManagerFactorygetManagerFactory()This method will ensure that you have a right and initialized instance ofStandaloneContextAware.protected java.util.List<java.lang.String>getTargetGroupsAsList()protected ro.isdc.wro.util.concurrent.TaskExecutor<java.lang.Void>getTaskExecutor()protected booleanisIncrementalBuild()protected booleanisIncrementalCheckRequired()protected booleanisParallelProcessing()protected ro.isdc.wro.manager.factory.WroManagerFactorynewWroManagerFactory()Allows explicitly to override the default implementation of the factory, assumingwroManagerFactoryconfiguration is not set.protected voidonAfterExecute()Invoked right after execution completion.protected voidonBeforeExecute()Invoked before execution is performed.protected voidvalidate()Checks if all required fields are configured.
-
-
-
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.ExceptionPerform actual plugin processing.- Throws:
java.lang.Exception
-
getManagerFactory
protected final ro.isdc.wro.manager.factory.WroManagerFactory getManagerFactory()
This method will ensure that you have a right and initialized instance ofStandaloneContextAware.- Returns:
WroManagerFactoryimplementation.
-
newWroManagerFactory
protected ro.isdc.wro.manager.factory.WroManagerFactory newWroManagerFactory() throws org.apache.maven.plugin.MojoExecutionExceptionAllows explicitly to override the default implementation of the factory, assumingwroManagerFactoryconfiguration is not set. When overriding this method, make sure thatonAfterCreate(WroManagerFactory)is invoked on newly created factory for proper initialization.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getTargetGroupsAsList
protected final java.util.List<java.lang.String> getTargetGroupsAsList() throws java.lang.Exception- Returns:
- a list of groups which will be processed.
- Throws:
java.lang.Exception
-
validate
protected void validate() throws org.apache.maven.plugin.MojoExecutionExceptionChecks if all required fields are configured.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
extendPluginClasspath
protected final void extendPluginClasspath() throws org.apache.maven.plugin.MojoExecutionExceptionUpdate the classpath.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getTaskExecutor
protected final ro.isdc.wro.util.concurrent.TaskExecutor<java.lang.Void> getTaskExecutor()
- Returns:
- The
TaskExecutorresponsible for running multiple tasks in parallel.
-
isIncrementalCheckRequired
protected boolean isIncrementalCheckRequired()
- Returns:
- true if the only incremental changed group should be used as target groups for next processing.
-
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.
-
isIncrementalBuild
protected final boolean isIncrementalBuild()
- Returns:
- true if the build was triggered by an incremental change.
-
isParallelProcessing
protected final boolean isParallelProcessing()
-
-