Maven Configuration Properties
The Vaadin Maven plugin contains configuration for most configuration 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 configuration options and their default values:
applicationPropertiesLocation of the
application.propertiesfile in a Spring project. Defaults to${project.basedir}/src/main/resources/application.propertieseagerServerLoadWhether or not to insert the initial UIDL object in the bootstrap
index.html. Defaults tofalse.frontendDirectoryThe directory with the project’s frontend source files. Defaults to
"${project.basedir}/frontend".generatedFolderThe folder where Flow will put generated files that will be used by webpack. Defaults to
"${project.build.directory}/frontend".generatedTsFolderThe folder where Flow will put TypeScript API files for client projects. Defaults to
"${project.basedir}/frontend/generated".javaSourceFolderJava source folders for scanning. Defaults to
"${project.basedir}/src/main/java".javaResourceFolderJava resource folder. Defaults to
"${project.basedir}/src/main/resources".nodeDownloadRootURL to use for downloading Node.js from. In environments behind a firewall, the Node.js download can be provided from an intranet mirror. Defaults to
nullwhich will download Node.js fromhttps://nodejs.org/dist/.nodeVersionThe 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.nodeAutoUpdateFlag to enable automatic update of the Node.js version installed in
~/.vaadinif it is older than the default or definednodeVersion. Note: any installed version belowshould work(at the moment 8.9) will be automatically updated regardless of this flag. Defaults tofalse.npmFolderThe folder where
package.jsonfile is located. Defaults to${project.basedir}.openApiJsonFileDefault generated path of the OpenAPI JSON. Defaults to
${project.build.directory}/generated-resources/openapi.json.pnpmEnableInstructs to use pnpm for installing npm frontend resources. Defaults to
true.useGlobalPnpmInstructs to use globally installed pnpm tool or the default supported pnpm version. Defaults to
false.productionModeDefine if application is running in productionMode. Defaults to
false. For production, the frontend is transpiled for older browsers and optimized, as described in Deploying to Production.projectBasedirThe folder where
package.jsonfile is located. Defaults to${project.basedir}.requireHomeNodeExecWhether Vaadin home node executable usage is forced. If it’s set to
truethen Vaadin home 'node' is checked and installed if absent. This is then be used instead of globally or locally installed 'node'. Defaults tofalse.resourceOutputDirectoryDefines the output directory for generated non-served resources, such as the token file. Defaults to
${project.build.outputDirectory}/vaadin-generated.useDeprecatedV14BootstrappingWhether or not we are running in legacy V14 bootstrap mode. Defaults to
false.webpackOutputDirectoryThe folder where webpack should output
index.jsand other generated files. Defaults to${project.build.outputDirectory}/META-IND/VAADIN/webapp/.projectBuildDirBuild directory for the project. Defaults to
${project.build.directory}.
Build Frontend Goal Parameters
The following parameters are used with the build-frontend goal in addition to the parameters described above.
generateBundleWhether to generate a bundle from the project frontend sources or not. Defaults to
true.runNpmInstallWhether to run
npm installtask after updating dependencies. This doesn’t necessarily executenpm installif everything seems to be up to date. Defaults totrue.generateEmbeddableWebComponentsWhether to generate embeddable web components from WebComponentExporter inheritors. Defaults to
true.frontendResourcesDirectoryDefines the project frontend directory from where resources should be copied from for using with webpack. Defaults to
${project.basedir}/src/main/resources/META-INF/resources/frontend.optimizeBundleWhether to use byte code scanner strategy to discover frontend components. Defaults to
true.webpackTemplateCopy the
webpack.config.jsfrom the specified URL if missing. Default is the template provided by this plugin. Set it to empty string to disable the feature. Defaults towebpack.config.js.webpackGeneratedTemplateCopy the
webpack.generated.jsfrom the specified URL. Default is the template provided by this plugin. Set it to empty string to disable the feature. Defaults towebpack.generated.js.