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 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) booleanbooleanbooleanbooleanbooleanbooleanbooleanMethods 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 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
-
ciBuild
public boolean ciBuild()- Specified by:
ciBuildin interfacePluginAdapterBuild
-
forceProductionBuild
public boolean forceProductionBuild()- Specified by:
forceProductionBuildin interfacePluginAdapterBuild
-
compressBundle
public boolean compressBundle()- Specified by:
compressBundlein interfacePluginAdapterBuild
-
applicationProperties
- Specified by:
applicationPropertiesin interfacePluginAdapterBase
-
eagerServerLoad
public boolean eagerServerLoad()- Specified by:
eagerServerLoadin interfacePluginAdapterBase
-
frontendDirectory
- Specified by:
frontendDirectoryin 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
-
logDebug
- Specified by:
logDebugin interfacePluginAdapterBase
-
logInfo
- Specified by:
logInfoin interfacePluginAdapterBase
-
logWarn
- Specified by:
logWarnin interfacePluginAdapterBase
-
logError
- Specified by:
logErrorin 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
-
bunEnable
public boolean bunEnable()- Specified by:
bunEnablein 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
-
frontendOutputDirectory
- Specified by:
frontendOutputDirectoryin 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
-
skipDevBundleBuild
public boolean skipDevBundleBuild()- Specified by:
skipDevBundleBuildin interfacePluginAdapterBase
-
isPrepareFrontendCacheDisabled
public boolean isPrepareFrontendCacheDisabled()- Specified by:
isPrepareFrontendCacheDisabledin interfacePluginAdapterBase
-
isReactEnabled
public boolean isReactEnabled()- Specified by:
isReactEnabledin interfacePluginAdapterBase
-
applicationIdentifier
- Specified by:
applicationIdentifierin interfacePluginAdapterBase
-
frontendExtraFileExtensions
- Specified by:
frontendExtraFileExtensionsin interfacePluginAdapterBase
-
checkRuntimeDependency
public boolean checkRuntimeDependency(String groupId, String artifactId, Consumer<String> missingDependencyMessageConsumer) - Specified by:
checkRuntimeDependencyin interfacePluginAdapterBuild
-
isNpmExcludeWebComponents
public boolean isNpmExcludeWebComponents()- Specified by:
isNpmExcludeWebComponentsin interfacePluginAdapterBase
-
isFrontendIgnoreVersionChecks
public boolean isFrontendIgnoreVersionChecks()- Specified by:
isFrontendIgnoreVersionChecksin interfacePluginAdapterBase
-