Starting a Project

You can use a Maven archetype to generate a Vaadin web application with a pre-configured Jetty Maven Plugin in it. Once created, you can import it in your IDE.

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

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

Show code

Expand code

  1. mvn -B archetype:generate \
  2. -DarchetypeGroupId=com.vaadin \
  3. -DarchetypeArtifactId=vaadin-archetype-application \
  4. -DarchetypeVersion=LATEST \
  5. -DgroupId=org.example \
  6. -DartifactId=my-webapp \
  7. -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 is currently one archetype, vaadin-archetype-application.

archetypeVersion

Version of the archetype to use. LATEST selects the latest version. For prerelease versions it should be the exact version number, such as 20.0.0.alpha8.

groupId

A Maven group ID for your project. It 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, so it should be Java compatible - only alphanumerics, and an underscore.

artifactId

Identifier of the artifact, that is, your project. The identifier may contain alphanumerics and underscore. It is appended to the group ID to obtain the Java package name for the sources. For example, if the group ID is com.example and artifact ID is myproject, the project sources would be placed in com.example.myproject package.

version

Initial version number of your application. The number must obey the Maven version numbering format.

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