Interface VaadinBuildTimeConfig


@ConfigMapping(prefix="vaadin.build") @ConfigRoot(phase=BUILD_TIME) public interface VaadinBuildTimeConfig
Build time configuration of the Vaadin Quarkus extension, read from the vaadin.build properties.
  • Method Details

    • enabled

      @WithDefault("true") boolean enabled()
      Gets if Vaadin Quarkus Plugins is enabled.
      Returns:
      true if the plugin is enabled
    • frontendResourcesDirectory

      @WithDefault("src/main/resources/META-INF/resources/frontend") File frontendResourcesDirectory()
      Defines the project frontend directory from where resources should be copied from for use with the frontend build tool.
      Returns:
      the frontend resources directory
    • generateBundle

      @WithDefault("true") boolean generateBundle()
      Whether to generate a bundle from the project frontend sources or not. Defaults to true
      Returns:
      true to generate the bundle
    • generateEmbeddableWebComponents

      @WithDefault("true") boolean generateEmbeddableWebComponents()
      Whether to generate embeddable web components from WebComponentExporter inheritors.
      Returns:
      true to generate embeddable web components
    • optimizeBundle

      @WithDefault("true") boolean optimizeBundle()
      Whether to use byte code scanner strategy to discover frontend components.
      Returns:
      true to use the byte code scanner
    • runNpmInstall

      @WithDefault("true") boolean runNpmInstall()
      Whether to run npm install after updating dependencies.
      Returns:
      true to run npm install
    • ciBuild

      @WithDefault("false") boolean ciBuild()
      Setting this to true will run npm ci instead of npm install when using npm. If using pnpm, the install will be run with --frozen-lockfile parameter. This makes sure that the versions in package lock file will not be overwritten and production builds are reproducible.
      Returns:
      true to run a CI build
    • forceProductionBuild

      @WithDefault("false") boolean forceProductionBuild()
      Setting this to true will force a build of the production build even if there is a default production bundle that could be used. Created production bundle optimization is defined by optimizeBundle parameter.
      Returns:
      true to force the production build
    • cleanFrontendFiles

      @WithDefault("true") boolean cleanFrontendFiles()
      Control cleaning of generated frontend files when executing 'build-frontend'. Mainly this is wanted to be true which it is by default.
      Returns:
      true to clean the generated frontend files
    • applicationProperties

      @WithDefault("src/main/resources/application.properties") File applicationProperties()
      Application properties file in Quarkus project.
      Returns:
      the application properties file
    • eagerServerLoad

      @WithDefault("false") boolean eagerServerLoad()
      Whether to insert the initial UIDL object in the bootstrap index.html
      Returns:
      true to insert the initial UIDL object
    • frontendDirectory

      @WithDefault("src/main/frontend/") File frontendDirectory()
      A directory with project's frontend source files.
      Returns:
      the frontend directory
    • generatedTsFolder

      Optional<File> generatedTsFolder()
      The folder where flow will put TS API files for client projects.
      Returns:
      the folder for generated TypeScript files, if set
    • nodeDownloadRoot

      Optional<String> nodeDownloadRoot()
      Download node. js from this URL. Handy in heavily firewalled corporate environments where the node.js download can be provided from an intranet mirror. Defaults to null which will cause the downloader to use NodeInstaller.DEFAULT_NODEJS_DOWNLOAD_ROOT. Example: https://nodejs.org/dist/
      Returns:
      the Node.js download root URL, if set
    • nodeVersion

      @WithDefault("v26.13.1") String nodeVersion()
      The node. js version to be used when node. js is installed automatically by Vaadin, for example `"v16.0.0"`. Defaults to the Vaadin-default node version - see FrontendTools for details.
      Returns:
      the Node.js version
    • nodeFolder

      Optional<File> nodeFolder()
      The folder containing the Node.js executable.

      When set, Node.js will be exclusively used from this folder. If not found, the build will fail. If not provided, Vaadin will try to detect an existing compatible Node.js installation or install it in Vaadin home directory.

      Returns:
      the Node.js folder, if set
    • npmFolder

      Optional<File> npmFolder()
      The folder where `package. json` file is located. Default is project root dir.
      Returns:
      the folder of package.json, if set
    • openApiJsonFile

      @WithDefault("generated-resources/openapi.json") File openApiJsonFile()
      Default generated path of the OpenAPI json.
      Returns:
      the OpenAPI json file
    • pnpmEnable

      @WithDefault("false") boolean pnpmEnable()
      Instructs to use pnpm for installing npm frontend resources.
      Returns:
      true to use pnpm
    • bunEnable

      @WithDefault("false") boolean bunEnable()
      Instructs to use bun for installing npm frontend resources.
      Returns:
      true to use bun
    • useGlobalPnpm

      @WithDefault("false") boolean useGlobalPnpm()
      Instructs to use globally installed pnpm tool or the default supported pnpm version.
      Returns:
      true to use the globally installed pnpm
    • requireHomeNodeExec

      @WithDefault("false") boolean requireHomeNodeExec()
      Whether vaadin home node executable usage is forced. If it's set to true then vaadin home 'node' is checked and installed if it's absent. Then it will be used instead of globally 'node' or locally installed 'node'.
      Returns:
      true to require the Node.js executable in Vaadin home
    • generatedResourceOutputDirectory

      @WithDefault("META-INF/VAADIN/") File generatedResourceOutputDirectory()
      Defines the output directory for generated non-served resources, such as the token file.
      Returns:
      the output directory for generated non-served resources
    • resourcesOutputDirectory

      @WithDefault("META-INF/resources/") File resourcesOutputDirectory()
      The resources output directory for META-INF/resources in the classes output directory.
      Returns:
      the META-INF/resources directory, usually {output}/classes/META-INF/resources
    • webpackOutputDirectory

      @Deprecated(since="24.8", forRemoval=true) Optional<File> webpackOutputDirectory()
      Deprecated, for removal: This API element is subject to removal in a future version.
      The folder where the frontend build tool should output index. js and other generated files.
      Returns:
      the frontend build output directory, if set
    • frontendOutputDirectory

      @WithDefault("META-INF/VAADIN/webapp/") File frontendOutputDirectory()
      The folder where the frontend build tool should output index. js and other generated files.
      Returns:
      the frontend build output directory
    • postinstallPackages

      Optional<List<String>> postinstallPackages()
      Additional npm packages to run post install scripts for.

      Post install is automatically run for internal dependencies which rely on post install scripts to work, e.g. esbuild.

      Returns:
      the additional packages to run post install scripts for, if set
    • excludePostinstallPackages

      Optional<List<String>> excludePostinstallPackages()
      Npm packages to exclude from running post install scripts.

      Used to skip built-in entries (e.g. esbuild) when their postinstall step is known to fail or is not needed.

      Returns:
      the packages to exclude from post install scripts, if set
    • skipDevBundleBuild

      @WithDefault("false") boolean skipDevBundleBuild()
      Whether to disable dev bundle rebuild.
      Returns:
      true to skip the dev bundle rebuild
    • reactEnabled

      Optional<Boolean> reactEnabled()
      Whether to enable react
      Returns:
      whether React is enabled, if set
    • applicationIdentifier

      Optional<String> applicationIdentifier()
      Identifier for the application. If not specified, defaults to the hashed value of 'groupId:artifactId'.
      Returns:
      the application identifier, if set
    • frontendExtraFileExtensions

      Optional<List<String>> frontendExtraFileExtensions()
      Parameter for adding file extensions to handle when generating bundles. Hashes are calculated for these files as part of detecting if a new bundle should be generated. From the commandline use comma separated list -Ddevmode.frontendExtraFileExtensions="svg,ico" In plugin configuration use comma separated values svg,ico
      Returns:
      the additional file extensions, if set
    • npmExcludeWebComponents

      @WithDefault("false") boolean npmExcludeWebComponents()
      Whether to exclude npm packages for web components.
      Returns:
      true to exclude npm packages for web components
    • frontendIgnoreVersionChecks

      @WithDefault("false") boolean frontendIgnoreVersionChecks()
      Set to true to ignore node/npm tool version checks.

      Note that disabling frontend tools version checking could cause failing builds and other issues that are difficult to debug.
      Returns:
      true to ignore the version checks
    • commercialWithBanner

      @WithDefault("false") boolean commercialWithBanner()
      Allows building a version of the application with a commercial banner when commercial components are used without a license key.
      Returns:
      true to allow building with a commercial banner
    • minimumFrontendPackageAgeDays

      Optional<Integer> minimumFrontendPackageAgeDays()
      Minimum age (in days) a frontend (npm) package version must have before npm, pnpm or bun is allowed to install it. Mitigates supply-chain attacks where a compromised version is briefly available on the registry. Set to 0 to disable. Requires pnpm ≥ 10.16.0 or bun ≥ 1.3.0 when those tools are used.

      When not set, the value configured for npm or pnpm itself (.npmrc or pnpm-workspace.yaml) is used, so that a manually run npm install behaves the same way. Only when there is no such value does the check default to 1 day. The configuration of bun cannot be read, so the default always applies for it.

      Returns:
      the minimum package age in days, if set