Maven Configuration Properties
The Vaadin Maven plugin contains configuration for most configurable properties. These can be set either as system properties or configuration parameters for the plugin.
Using Maven Plugin Configuration
The best way to set persistent configuration properties for a Maven project is to set them in the plugin.
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
<configuration>
<nodeAutoUpdate>true</nodeAutoUpdate>
</configuration>
</plugin>
See the full list of properties.
Plugin Configuration Options
The following list shows all the configuration options and their default values:
applicationProperties
-
Location of the
application.properties
file in a Spring project. Defaults to${project.basedir}/src/main/resources/application.properties
. eagerServerLoad
-
Whether to insert the initial User Interface Definition Language (UIDL) object in the bootstrap
index.html
. Defaults tofalse
. frontendDirectory
-
The directory with the project’s frontend source files. Defaults to
"${project.basedir}/frontend"
. generatedFolder
-
The folder where Flow puts generated files that are used by Vite. Defaults to
"${project.build.directory}/frontend"
. generatedTsFolder
-
The folder where Flow puts TypeScript API files for client projects. Defaults to
"${project.basedir}/frontend/generated"
. javaSourceFolder
-
Java source folders for scanning. Defaults to
"${project.basedir}/src/main/java"
. javaResourceFolder
-
Java resource folder. Defaults to
"${project.basedir}/src/main/resources"
. nodeDownloadRoot
-
URL to use for downloading Node.js. In environments behind a firewall, the Node.js download can be provided from an intranet mirror. Defaults to
null
, which downloads Node.js fromhttps://nodejs.org/dist/
. nodeVersion
-
The Node.js version to be used when Node.js is installed automatically. Should be in the format
"v16.0.0"
. Defaults toFrontendTools.DEFAULT_NODE_VERSION
. nodeAutoUpdate
-
Flag to enable automatic update of the Node.js version installed in
~/.vaadin
if it’s older than the default or definednodeVersion
. Note: any installed version belowshould work
is automatically updated regardless of this flag. Defaults tofalse
. npmFolder
-
The folder where the
package.json
file is located. Defaults to${project.basedir}
. openApiJsonFile
-
Default generated path of the OpenAPI JSON. Defaults to
${project.build.directory}/generated-resources/openapi.json
. pnpmEnable
-
Specifies to use
pnpm
to installnpm
frontend resources. Defaults totrue
. useGlobalPnpm
-
Specifies to use the globally installed
pnpm
tool or the default supportedpnpm
version. Defaults tofalse
. productionMode
-
Define whether the application is running in production mode. Defaults to
false
. For production, the frontend is bundled and optimized, as described in Deploying to Production. projectBasedir
-
The folder where the
package.json
file is located. Defaults to${project.basedir}
. requireHomeNodeExec
-
Whether Vaadin home node executable usage is forced. If it’s set to
true
, the Vaadin home 'node' is checked, and installed if absent. This is then used instead of a globally or locally installed 'node'. Defaults tofalse
. resourceOutputDirectory
-
Defines the output directory for generated non-served resources, such as the token file. Defaults to
${project.build.outputDirectory}/vaadin-generated
. useDeprecatedV14Bootstrapping
-
Optionally use the legacy V14 bootstrap mode. Defaults to
false
. frontendBundleOutput
-
The folder where Vite (the default frontend build tool) should output
index.js
and other generated files. Defaults to${project.build.outputDirectory}/META-INF/VAADIN/webapp/
. projectBuildDir
-
Build directory for the project. Defaults to
${project.build.directory}
. skipDevBundleRebuild
-
Prevents frontend development bundle from being re-built even if Vaadin decides to use an existing compiled development bundle. This is mainly needed when re-bundling checker in Flow has issues leading to false re-bundling and one needs a workaround while the problem is being resolved. Defaults to
false
.
Build Frontend Goal Parameters
The following parameters are used with the build-frontend
goal, in addition to the parameters described above.
generateBundle
-
Whether to generate a bundle from the project frontend sources. Defaults to
true
. runNpmInstall
-
Whether to run the
npm install
task after updating dependencies. This doesn’t necessarily executenpm install
if everything seems to be up to date. Defaults totrue
. generateEmbeddableWebComponents
-
Whether to generate embeddable web components from
WebComponentExporter
inheritors. Defaults totrue
. frontendResourcesDirectory
-
Defines the project frontend directory from where resources should be copied to use with Vite. Defaults to
${project.basedir}/src/main/resources/META-INF/resources/frontend
. optimizeBundle
-
Whether to use a byte code scanner strategy to discover frontend components. Defaults to
true
. ciBuild
-
Defines whether
npm ci
is run instead ofnpm i
in production frontend builds. If you use pnpm, the install command is run with the--frozen-lockfile
parameter. The build fails if thepackage.json
andpackage-lock.json
files have mismatching versions. Defaults tofalse
. forceProductionBuild
-
Forces Vaadin to create a new production bundle even if a pre-compiled one can be used. Usually needed to create an optimized production bundle and to load components sources to the browser on demand, i.e. once one opens a route where these components are used. Defaults to
false
.
CD6D2FC7-ED44-442C-B32F-FABA5AF7294F