Class BuildFrontendMojo

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

@Mojo(name="build-frontend", requiresDependencyResolution=COMPILE_PLUS_RUNTIME, defaultPhase=PROCESS_CLASSES) @Execute(goal="configure") public class BuildFrontendMojo extends com.vaadin.flow.plugin.maven.BuildFrontendMojo
Goal that builds the frontend bundle. It performs the following actions when creating a package:
  • Update Constants.PACKAGE_JSON file with the NpmPackage annotations defined in the classpath,
  • Copy resource files used by flow from `.jar` files to the `node_modules` folder
  • Install dependencies by running npm install
  • Update the FrontendUtils.IMPORTS_NAME file imports with the JsModule Theme and JavaScript annotations defined in the classpath,
  • Update FrontendUtils.VITE_CONFIG file.
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

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

    checkRuntimeDependency, ciBuild, cleanFrontendFiles, compressBundle, executeInternal, forceProductionBuild, frontendResourcesDirectory, generateBundle, generateEmbeddableWebComponents, optimizeBundle, runNpmInstall

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

    applicationIdentifier, applicationProperties, buildFolder, bunEnable, eagerServerLoad, execute, frontendDirectory, frontendExtraFileExtensions, generatedTsFolder, getClassFinder, getClasspathElements, getJarFiles, isDebugEnabled, isFrontendHotdeploy, 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

    applicationIdentifier, applicationProperties, buildFolder, bunEnable, createLookup, eagerServerLoad, frontendDirectory, frontendExtraFileExtensions, generatedTsFolder, getClassFinder, getJarFiles, isDebugEnabled, isFrontendHotdeploy, isJarProject, isNpmExcludeWebComponents, isPrepareFrontendCacheDisabled, isReactEnabled, javaResourceFolder, javaSourceFolder, logDebug, logDebug, logError, logError, logInfo, logWarn, logWarn, nodeAutoUpdate, nodeDownloadRoot, nodeVersion, npmFolder, openApiJsonFile, pnpmEnable, postinstallPackages, projectBaseDirectory, requireHomeNodeExec, servletResourceOutputDirectory, skipDevBundleBuild, useGlobalPnpm, webpackOutputDirectory
  • Constructor Details

    • BuildFrontendMojo

      public BuildFrontendMojo()