Docs

Documentation versions (currently viewingVaadin 25.4 (pre-release))

Using Vaadin on the Module Path

The stable Java module names of the Vaadin jars and how to require them from a module descriptor.

The Vaadin jars declare a stable Java Platform Module System (JPMS) module name in the Automatic-Module-Name entry of their manifest. On the module path, each jar is an automatic module with that name, instead of a name derived from its file name. Applications and add-ons can require Vaadin modules by these names in their module-info.java, and a name stays the same in later versions.

The Vaadin jars have no module descriptor of their own. As automatic modules, they export and open all their packages and read every other module. A module that reads one automatic module also reads all the other automatic modules on the module path. On the class path, the manifest entry has no effect.

Requiring Vaadin Modules

Add a requires directive to module-info.java for each Vaadin module whose packages your code uses. Vaadin uses reflection to create views and to read and write the beans that Binder binds. In a Spring application, Spring creates the views. Therefore, also open the packages that contain views and bound beans. An opens directive without a to clause opens the package to all modules, so it works with and without Spring:

Source code
Java
module com.example.app {
    requires com.vaadin.flow.server;
    requires com.vaadin.flow.data;
    requires com.vaadin.flow.component.grid;
    requires com.vaadin.flow.component.textfield;

    opens com.example.app.views;
}

The following limitations apply:

  • Development mode doesn’t run from the module path. During development, run the application from the class path.

  • The Spreadsheet jar contains a class in the org.apache.poi.ss.formula package, which the org.apache.poi:poi jar also contains. Two modules on the module path can’t contain the same package, so Spreadsheet can’t be used from the module path.

  • Build plugins, TestBench, and other jars that are used only at build or test time have no declared module name. vaadin-charts-flow-svg-generator, which is used for exporting charts, has no declared module name either.

Naming Rule

Most module names are the root package of the jar’s code, such as com.vaadin.flow.data for flow-data. Module Names lists the names of the Flow, platform, and browser-callable services jars.

The jars of the UI components are named com.vaadin.flow.component. followed by the artifact ID without vaadin- and -flow, and without dashes. For example, vaadin-combo-box-flow is com.vaadin.flow.component.combobox, and vaadin-grid-pro-flow is com.vaadin.flow.component.gridpro. The following jars have a different name, because their root package differs:

Artifact ID Module Name

vaadin-flow-components-base

com.vaadin.flow.component.shared

vaadin-icons-flow

com.vaadin.flow.component.icon

vaadin-renderer-flow

com.vaadin.flow.data.renderer

vaadin-lumo-theme

com.vaadin.flow.theme.lumo

vaadin-aura-theme

com.vaadin.flow.theme.aura

vaadin-ai-core-flow

com.vaadin.flow.component.ai

vaadin-ai-extensions-flow

com.vaadin.flow.component.ai.extensions

Module Names

The following tables list the module names that applications and add-ons most commonly require. The UI component jars aren’t listed, because their names follow the naming rule.

Flow

Artifact ID Module Name

flow-server

com.vaadin.flow.server

flow-data

com.vaadin.flow.data

flow-html-components

com.vaadin.flow.component.html

flow-lit-template

com.vaadin.flow.component.littemplate

flow-react

com.vaadin.flow.component.react

flow-dnd

com.vaadin.flow.component.dnd

flow-push

com.vaadin.flow.push

flow-webpush

com.vaadin.flow.server.webpush

vaadin-spring

com.vaadin.flow.spring

vaadin-cdi

com.vaadin.cdi

vaadin-quarkus

com.vaadin.quarkus

Browser-Callable Services and React Views

Artifact ID Module Name

hilla

com.vaadin.hilla.platform

hilla-endpoint

com.vaadin.hilla.endpoint

hilla-engine-core

com.vaadin.hilla.engine

hilla-engine-runtime

com.vaadin.hilla.internal

hilla-typescript-generator

com.vaadin.hilla.parser

hilla-runtime-plugin-transfertypes

com.vaadin.hilla.runtime.transfertypes

Platform

Artifact ID Module Name

vaadin

com.vaadin.platform

vaadin-core

com.vaadin.core

vaadin-spring-boot-starter

com.vaadin.spring.boot.starter

hilla-spring-boot-starter

com.vaadin.hilla.spring.boot.starter

vaadin-quarkus-extension

com.vaadin.quarkus.extension