Docs

Start a Project

How to use a Maven Archetype to generate a Vaadin web application.

You can use a Maven archetype to generate a Vaadin web application with a preconfigured Jetty Maven plugin in it. Once it’s created, you can import it into your IDE.

Most IDEs support creating a project from a Maven archetype. See your IDE and its documentation for instructions.

On the command-line, you can generate a project as follows:

mvn -B archetype:generate \
-DarchetypeGroupId=com.vaadin \
-DarchetypeArtifactId=vaadin-archetype-application \
-DarchetypeVersion=LATEST \
-DgroupId=org.example \
-DartifactId=my-webapp \
-Dversion=1.0-SNAPSHOT

The parameters are as follows:

archetypeGroupId

The group ID of the archetype is com.vaadin for Vaadin archetypes.

archetypeArtifactId

The archetype ID. There’s currently one archetype, vaadin-archetype-application.

archetypeVersion

Version of the archetype to use. LATEST selects the latest version. For pre-release versions, it should be the exact version number, such as 24.6.0.alpha2.

groupId

A Maven group ID for your project. This is normally your organization domain name in reverse order, such as com.example. The group ID is also used as a prefix for the Java package in the sources. For this reason, it should be Java-compatible; that is, consisting of only alphanumeric characters and the underscore character.

artifactId

Identifier of the artifact, that is, your project. The identifier may contain alphanumeric and underscore characters. It’s appended to the group ID to create the Java package name for the sources. For example, if the group ID is com.example and the artifact ID is myproject, the project sources are placed in the com.example.myproject package.

version

The initial version number of your application. The number must follow the Maven version numbering format.

Creating a project can take a while, as Maven fetches all the dependencies.

84C3733B-809F-4DE6-9046-D13F5B32647E