Class BuildFrontendMojo

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

@Mojo(name="build-frontend", requiresDependencyResolution=COMPILE_PLUS_RUNTIME, defaultPhase=PROCESS_CLASSES) public class BuildFrontendMojo extends FlowModeAbstractMojo implements PluginAdapterBuild
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:
2.0