Last Updated: February 25, 2016
·
1.045K
· sgtom42

Maven command to setup a Vaadin-based project

There is quite some documentation on the topic, but I have not seen all the steps properly and short listed in one place ;-):

mvn archetype:generate -DarchetypeGroupId=com.vaadin
-DarchetypeArtifactId=vaadin-archetype-clean
-DarchetypeVersion=LATEST
-DgroupId=GROUPID
-DartifactId=ARTIFACT
ID
-Dversion=1.0
-Dpackaging=war
-DarchetypeRepository=http://repo1.maven.org/maven2

Just replace GROUPID and ARTIFACTID with the proper values for your project and this will setup the complete Maven project.

Packaging can then be done using:
mvn clean compile package

Executing the application on jetty can be done using:
mvn jetty:run

The result can then be seen under the URL:
http://localhost:8080/PATH/

Just replace PATH with the name given for the path-entry in the context.xml file.