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:
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-dev-bundle",
requiresDependencyResolution=COMPILE_PLUS_RUNTIME,
defaultPhase=PROCESS_CLASSES)
public class BuildDevBundleMojo
extends org.apache.maven.plugin.AbstractMojo
implements com.vaadin.flow.plugin.base.PluginAdapterBuild, com.vaadin.flow.plugin.base.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 TypeMethodDescriptionbooleanbooleancheckRuntimeDependency(String groupId, String artifactId, Consumer<String> missingDependencyMessageConsumer) booleanciBuild()booleanbooleanvoidexecute()voidbooleanbooleanbooleancom.vaadin.flow.server.frontend.scanner.ClassFinderbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidlogDebug(CharSequence debugMessage) voidlogDebug(CharSequence debugMessage, Throwable e) voidlogError(CharSequence error) voidlogError(CharSequence error, 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, isCommercialBannerEnabled
-
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.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
executeInternal
public void executeInternal() throws org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoFailureException
-
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
-
forceProductionBuild
public boolean forceProductionBuild()- Specified by:
forceProductionBuildin interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-
compressBundle
public boolean compressBundle()- Specified by:
compressBundlein interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-
applicationProperties
- Specified by:
applicationPropertiesin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
eagerServerLoad
public boolean eagerServerLoad()- Specified by:
eagerServerLoadin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
frontendDirectory
- Specified by:
frontendDirectoryin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
generatedTsFolder
- Specified by:
generatedTsFolderin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
getClassFinder
public com.vaadin.flow.server.frontend.scanner.ClassFinder getClassFinder()- Specified by:
getClassFinderin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
getJarFiles
- Specified by:
getJarFilesin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
isDebugEnabled
public boolean isDebugEnabled()- Specified by:
isDebugEnabledin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
javaSourceFolder
- Specified by:
javaSourceFolderin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
javaResourceFolder
- Specified by:
javaResourceFolderin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
logDebug
- Specified by:
logDebugin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
logDebug
- Specified by:
logDebugin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
logInfo
- Specified by:
logInfoin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
logWarn
- Specified by:
logWarnin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
logError
- Specified by:
logErrorin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
logWarn
- Specified by:
logWarnin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
logError
- Specified by:
logErrorin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
nodeDownloadRoot
- Specified by:
nodeDownloadRootin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase- Throws:
URISyntaxException
-
nodeVersion
- Specified by:
nodeVersionin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
npmFolder
- Specified by:
npmFolderin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
openApiJsonFile
- Specified by:
openApiJsonFilein interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
pnpmEnable
public boolean pnpmEnable()- Specified by:
pnpmEnablein interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
bunEnable
public boolean bunEnable()- Specified by:
bunEnablein interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
useGlobalPnpm
public boolean useGlobalPnpm()- Specified by:
useGlobalPnpmin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
projectBaseDirectory
- Specified by:
projectBaseDirectoryin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
requireHomeNodeExec
public boolean requireHomeNodeExec()- Specified by:
requireHomeNodeExecin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
nodeFolder
- Specified by:
nodeFolderin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
servletResourceOutputDirectory
- Specified by:
servletResourceOutputDirectoryin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
webpackOutputDirectory
- Specified by:
webpackOutputDirectoryin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
frontendOutputDirectory
- Specified by:
frontendOutputDirectoryin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
isJarProject
public boolean isJarProject()- Specified by:
isJarProjectin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
buildFolder
- Specified by:
buildFolderin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
postinstallPackages
- Specified by:
postinstallPackagesin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
isFrontendHotdeploy
public boolean isFrontendHotdeploy()- Specified by:
isFrontendHotdeployin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
skipDevBundleBuild
public boolean skipDevBundleBuild()- Specified by:
skipDevBundleBuildin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
isPrepareFrontendCacheDisabled
public boolean isPrepareFrontendCacheDisabled()- Specified by:
isPrepareFrontendCacheDisabledin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
isReactEnabled
public boolean isReactEnabled()- Specified by:
isReactEnabledin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
applicationIdentifier
- Specified by:
applicationIdentifierin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
frontendExtraFileExtensions
- Specified by:
frontendExtraFileExtensionsin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
checkRuntimeDependency
public boolean checkRuntimeDependency(String groupId, String artifactId, Consumer<String> missingDependencyMessageConsumer) - Specified by:
checkRuntimeDependencyin interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-
isNpmExcludeWebComponents
public boolean isNpmExcludeWebComponents()- Specified by:
isNpmExcludeWebComponentsin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
isFrontendIgnoreVersionChecks
public boolean isFrontendIgnoreVersionChecks()- Specified by:
isFrontendIgnoreVersionChecksin interfacecom.vaadin.flow.plugin.base.PluginAdapterBase
-
resourcesOutputDirectory
- Specified by:
resourcesOutputDirectoryin interfacecom.vaadin.flow.plugin.base.PluginAdapterBuild
-