Package com.vaadin.flow.plugin.maven
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:
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) public class BuildFrontendMojo extends FlowModeAbstractMojo implements com.vaadin.flow.plugin.base.PluginAdapterBuildGoal that builds the frontend bundle. It performs the following actions when creating a package:- Update
Constants.PACKAGE_JSONfile with theNpmPackageannotations 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_NAMEfile imports with theJsModuleThemeandJavaScriptannotations defined in the classpath, - Update
FrontendUtils.WEBPACK_CONFIGfile.
- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class com.vaadin.flow.plugin.maven.FlowModeAbstractMojo
INCLUDE_FROM_COMPILE_DEPS_REGEX
-
-
Constructor Summary
Constructors Constructor Description BuildFrontendMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanciBuild()voidexecute()FilefrontendResourcesDirectory()booleangenerateBundle()booleangenerateEmbeddableWebComponents()booleanoptimizeBundle()booleanrunNpmInstall()-
Methods inherited from class com.vaadin.flow.plugin.maven.FlowModeAbstractMojo
applicationProperties, buildFolder, eagerServerLoad, frontendDirectory, generatedFolder, generatedTsFolder, getClassFinder, getClasspathElements, getJarFiles, getUseDeprecatedV14Bootstrapping, isDebugEnabled, isJarProject, javaResourceFolder, javaSourceFolder, logDebug, logError, logInfo, logWarn, logWarn, nodeAutoUpdate, nodeDownloadRoot, nodeVersion, npmFolder, openApiJsonFile, pnpmEnable, postinstallPackages, productionMode, projectBaseDirectory, requireHomeNodeExec, servletResourceOutputDirectory, 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
applicationProperties, buildFolder, createLookup, eagerServerLoad, frontendDirectory, generatedFolder, generatedTsFolder, getClassFinder, getJarFiles, getUseDeprecatedV14Bootstrapping, isDebugEnabled, isJarProject, isUseDeprecatedV14Bootstrapping, javaResourceFolder, javaSourceFolder, logDebug, logError, logInfo, logWarn, logWarn, nodeAutoUpdate, nodeDownloadRoot, nodeVersion, npmFolder, openApiJsonFile, pnpmEnable, postinstallPackages, productionMode, projectBaseDirectory, requireHomeNodeExec, servletResourceOutputDirectory, useGlobalPnpm, webpackOutputDirectory
-
-
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
frontendResourcesDirectory
public File frontendResourcesDirectory()
- Specified by:
frontendResourcesDirectoryin interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-
generateBundle
public boolean generateBundle()
- Specified by:
generateBundlein interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-
generateEmbeddableWebComponents
public boolean generateEmbeddableWebComponents()
- Specified by:
generateEmbeddableWebComponentsin interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-
optimizeBundle
public boolean optimizeBundle()
- Specified by:
optimizeBundlein interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-
runNpmInstall
public boolean runNpmInstall()
- Specified by:
runNpmInstallin interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-
ciBuild
public boolean ciBuild()
- Specified by:
ciBuildin interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-
-