Class PrepareFrontendMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.vaadin.flow.plugin.maven.FlowModeAbstractMojo
com.vaadin.flow.plugin.maven.PrepareFrontendMojo
com.vaadin.hilla.maven.PrepareFrontendMojo
All Implemented Interfaces:
com.vaadin.flow.plugin.base.PluginAdapterBase, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="prepare-frontend", requiresDependencyResolution=COMPILE_PLUS_RUNTIME, defaultPhase=PROCESS_RESOURCES) public class PrepareFrontendMojo extends com.vaadin.flow.plugin.maven.PrepareFrontendMojo
This goal checks that node and npm tools are installed and creates or updates `package.json` and the frontend build tool configuration files.

Copies frontend resources available inside `.jar` dependencies to `node_modules` when building a jar package.

Since:
Flow 2.0
  • Field Summary

    Fields inherited from class com.vaadin.flow.plugin.maven.FlowModeAbstractMojo

    INCLUDE_FROM_COMPILE_DEPS_REGEX, productionMode

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

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected void
     
     
     
     
     
     

    Methods inherited from class com.vaadin.flow.plugin.maven.FlowModeAbstractMojo

    applicationIdentifier, applicationProperties, buildFolder, bunEnable, eagerServerLoad, execute, frontendDirectory, frontendExtraFileExtensions, frontendOutputDirectory, generatedTsFolder, getClassFinder, getJarFiles, isCommercialBannerEnabled, isDebugEnabled, isFrontendHotdeploy, isFrontendIgnoreVersionChecks, isHillaAvailable, isHillaAvailable, isHillaUsed, isHillaUsed, isJarProject, isNpmExcludeWebComponents, isPrepareFrontendCacheDisabled, isReactEnabled, javaResourceFolder, javaSourceFolder, logDebug, logDebug, logError, logError, logInfo, logWarn, logWarn, nodeAutoUpdate, nodeDownloadRoot, nodeVersion, npmFolder, openApiJsonFile, pnpmEnable, postinstallPackages, projectBaseDirectory, requireHomeNodeExec, servletResourceOutputDirectory, skipDevBundleBuild, triggerRefresh, useGlobalPnpm, webpackOutputDirectory

    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

    Methods inherited from interface com.vaadin.flow.plugin.base.PluginAdapterBase

    createLookup
  • Constructor Details

    • PrepareFrontendMojo

      public PrepareFrontendMojo()
  • Method Details

    • executeInternal

      protected void executeInternal() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Overrides:
      executeInternal in class com.vaadin.flow.plugin.maven.PrepareFrontendMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • getNode

      public String getNode()
    • getMainClass

      public String getMainClass()
    • getFrontend

      public File getFrontend()
    • getGenerated

      public File getGenerated()
    • getPluginContext

      Map getPluginContext()
    • configure

      default EngineAutoConfiguration configure() throws org.apache.maven.artifact.DependencyResolutionRequiredException
      Throws:
      org.apache.maven.artifact.DependencyResolutionRequiredException