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.AbstractMojo
Defines most common properties used by wro4j build-time solution
infrastructure.
- Author:
- Alex Objelean, Paul Podgorsek
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidPerform actual plugin processing.final voidexecute()protected final voidUpdate the classpath.protected final WroManagerFactoryThis method will ensure that you have a right and initialized instance ofStandaloneContextAware.protected final TaskExecutor<Void>protected final booleanprotected booleanprotected final booleanprotected WroManagerFactoryAllows explicitly to override the default implementation of the factory, assumingwroManagerFactoryconfiguration is not set.protected voidInvoked right after execution completion.protected voidInvoked before execution is performed.protected voidvalidate()Checks if all required fields are configured.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
AbstractWro4jMojo
public AbstractWro4jMojo()
-
-
Method Details
-
execute
public final void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
doExecute
Perform actual plugin processing.- Throws:
Exception
-
getManagerFactory
This method will ensure that you have a right and initialized instance ofStandaloneContextAware.- Returns:
WroManagerFactoryimplementation.
-
newWroManagerFactory
protected 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
- Returns:
- a list of groups which will be processed.
- Throws:
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
- 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()
-