Class AbstractFrontendMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
BowerMojo, BunMojo, CorepackMojo, EmberMojo, GruntMojo, GulpMojo, InstallBunMojo, InstallNodeAndCorepackMojo, InstallNodeAndNpmMojo, InstallNodeAndPnpmMojo, InstallNodeAndYarnMojo, JspmMojo, KarmaRunMojo, NpmMojo, NpxMojo, PnpmMojo, WebpackMojo, YarnMojo

public abstract class AbstractFrontendMojo extends org.apache.maven.plugin.AbstractMojo
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map<String,String>
    Additional environment variables to pass to the build.
    protected org.apache.maven.plugin.MojoExecution
     
    protected File
    The base directory for installing node and npm.
    protected Boolean
    Whether you should skip while running in the test phase (default is false)
    protected boolean
    Set this to true to ignore a failure during testing.
    protected File
    The base directory for running all Node commands.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected abstract void
     
    protected Map<String,String>
    getHttpHeaders(org.apache.maven.settings.Server server)
    Provides the HTTP-Headers from the server section of settings.xml.
    protected abstract boolean
    Implemented by children to determine if this execution should be skipped.

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

    • execution

      @Component protected org.apache.maven.plugin.MojoExecution execution
    • skipTests

      @Parameter(property="skipTests", required=false, defaultValue="false") protected Boolean skipTests
      Whether you should skip while running in the test phase (default is false)
    • testFailureIgnore

      @Parameter(property="maven.test.failure.ignore", defaultValue="false") protected boolean testFailureIgnore
      Set this to true to ignore a failure during testing. Its use is NOT RECOMMENDED, but quite convenient on occasion.
      Since:
      1.4
    • workingDirectory

      @Parameter(defaultValue="${basedir}", property="workingDirectory", required=false) protected File workingDirectory
      The base directory for running all Node commands. (Usually the directory that contains package.json)
    • installDirectory

      @Parameter(property="installDirectory", required=false) protected File installDirectory
      The base directory for installing node and npm.
    • environmentVariables

      @Parameter protected Map<String,String> environmentVariables
      Additional environment variables to pass to the build.
  • Constructor Details

    • AbstractFrontendMojo

      public AbstractFrontendMojo()
  • Method Details

    • execute

      protected abstract void execute(FrontendPluginFactory factory) throws FrontendException
      Throws:
      FrontendException
    • skipExecution

      protected abstract boolean skipExecution()
      Implemented by children to determine if this execution should be skipped.
    • execute

      public void execute() throws org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoFailureException
    • getHttpHeaders

      protected Map<String,String> getHttpHeaders(org.apache.maven.settings.Server server)
      Provides the HTTP-Headers from the server section of settings.xml.
      Parameters:
      server - the <server> entry from the settings.xml
      Returns:
      the mapping from the name of each configured HTTP header to its value, an empty map if there is no such configuration