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
  • 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

      protected abstract void doExecute() throws Exception
      Perform actual plugin processing.
      Throws:
      Exception
    • getManagerFactory

      protected final WroManagerFactory getManagerFactory()
      This method will ensure that you have a right and initialized instance of StandaloneContextAware.
      Returns:
      WroManagerFactory implementation.
    • newWroManagerFactory

      protected WroManagerFactory newWroManagerFactory() throws org.apache.maven.plugin.MojoExecutionException
      Allows explicitly to override the default implementation of the factory, assuming wroManagerFactory configuration is not set. When overriding this method, make sure that onAfterCreate(WroManagerFactory) is invoked on newly created factory for proper initialization.
      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
    • 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
    • getTaskExecutor

      protected final TaskExecutor<Void> getTaskExecutor()
      Returns:
      The TaskExecutor responsible 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()