Package com.vaadin.flow.plugin.maven
Class BuildDevBundleMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.vaadin.flow.plugin.maven.BuildDevBundleMojo
- All Implemented Interfaces:
PluginAdapterBase,PluginAdapterBuild,org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="build-dev-bundle",
requiresDependencyResolution=COMPILE_PLUS_RUNTIME,
defaultPhase=PROCESS_CLASSES)
public class BuildDevBundleMojo
extends org.apache.maven.plugin.AbstractMojo
implements PluginAdapterBuild, PluginAdapterBase
Goal that builds the dev frontend bundle to be used in Express Build mode.
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.VITE_CONFIGfile.
- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAdditionally include compile-time-only dependencies matching the pattern.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidexecute()booleanbooleancom.vaadin.flow.server.frontend.scanner.ClassFindergetClasspathElements(org.apache.maven.project.MavenProject project) Generates a List of ClasspathElements (Run and CompileTime) from a MavenProject.booleanbooleanbooleanvoidlogDebug(CharSequence debugMessage) voidlogError(CharSequence warning, Throwable e) voidlogInfo(CharSequence infoMessage) voidlogWarn(CharSequence warning) voidlogWarn(CharSequence warning, Throwable e) booleanbooleanbooleanbooleanbooleanbooleanMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.plugin.base.PluginAdapterBase
createLookup
-
Field Details
-
INCLUDE_FROM_COMPILE_DEPS_REGEX
Additionally include compile-time-only dependencies matching the pattern.- See Also:
-
-
Constructor Details
-
BuildDevBundleMojo
public BuildDevBundleMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoFailureException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Throws:
org.apache.maven.plugin.MojoFailureException
-
frontendResourcesDirectory
- Specified by:
frontendResourcesDirectoryin interfacePluginAdapterBuild
-
generateBundle
public boolean generateBundle()- Specified by:
generateBundlein interfacePluginAdapterBuild
-
generateEmbeddableWebComponents
public boolean generateEmbeddableWebComponents()- Specified by:
generateEmbeddableWebComponentsin interfacePluginAdapterBuild
-
optimizeBundle
public boolean optimizeBundle()- Specified by:
optimizeBundlein interfacePluginAdapterBuild
-
runNpmInstall
public boolean runNpmInstall()- Specified by:
runNpmInstallin interfacePluginAdapterBuild
-
getClasspathElements
Generates a List of ClasspathElements (Run and CompileTime) from a MavenProject.- Parameters:
project- a given MavenProject- Returns:
- List of ClasspathElements
-
applicationProperties
- Specified by:
applicationPropertiesin interfacePluginAdapterBase
-
eagerServerLoad
public boolean eagerServerLoad()- Specified by:
eagerServerLoadin interfacePluginAdapterBase
-
frontendDirectory
- Specified by:
frontendDirectoryin interfacePluginAdapterBase
-
generatedFolder
- Specified by:
generatedFolderin interfacePluginAdapterBase
-
generatedTsFolder
- Specified by:
generatedTsFolderin interfacePluginAdapterBase
-
getClassFinder
public com.vaadin.flow.server.frontend.scanner.ClassFinder getClassFinder()- Specified by:
getClassFinderin interfacePluginAdapterBase
-
getJarFiles
- Specified by:
getJarFilesin interfacePluginAdapterBase
-
isDebugEnabled
public boolean isDebugEnabled()- Specified by:
isDebugEnabledin interfacePluginAdapterBase
-
javaSourceFolder
- Specified by:
javaSourceFolderin interfacePluginAdapterBase
-
javaResourceFolder
- Specified by:
javaResourceFolderin interfacePluginAdapterBase
-
logDebug
- Specified by:
logDebugin interfacePluginAdapterBase
-
logInfo
- Specified by:
logInfoin interfacePluginAdapterBase
-
logWarn
- Specified by:
logWarnin interfacePluginAdapterBase
-
logWarn
- Specified by:
logWarnin interfacePluginAdapterBase
-
logError
- Specified by:
logErrorin interfacePluginAdapterBase
-
nodeDownloadRoot
- Specified by:
nodeDownloadRootin interfacePluginAdapterBase- Throws:
URISyntaxException
-
nodeAutoUpdate
public boolean nodeAutoUpdate()- Specified by:
nodeAutoUpdatein interfacePluginAdapterBase
-
nodeVersion
- Specified by:
nodeVersionin interfacePluginAdapterBase
-
npmFolder
- Specified by:
npmFolderin interfacePluginAdapterBase
-
openApiJsonFile
- Specified by:
openApiJsonFilein interfacePluginAdapterBase
-
pnpmEnable
public boolean pnpmEnable()- Specified by:
pnpmEnablein interfacePluginAdapterBase
-
useGlobalPnpm
public boolean useGlobalPnpm()- Specified by:
useGlobalPnpmin interfacePluginAdapterBase
-
projectBaseDirectory
- Specified by:
projectBaseDirectoryin interfacePluginAdapterBase
-
requireHomeNodeExec
public boolean requireHomeNodeExec()- Specified by:
requireHomeNodeExecin interfacePluginAdapterBase
-
servletResourceOutputDirectory
- Specified by:
servletResourceOutputDirectoryin interfacePluginAdapterBase
-
webpackOutputDirectory
- Specified by:
webpackOutputDirectoryin interfacePluginAdapterBase
-
isJarProject
public boolean isJarProject()- Specified by:
isJarProjectin interfacePluginAdapterBase
-
buildFolder
- Specified by:
buildFolderin interfacePluginAdapterBase
-
postinstallPackages
- Specified by:
postinstallPackagesin interfacePluginAdapterBase
-
isFrontendHotdeploy
public boolean isFrontendHotdeploy()- Specified by:
isFrontendHotdeployin interfacePluginAdapterBase
-