Docs

Documentation versions (currently viewingVaadin 24)

Build a Project

Make a production build of your Vaadin application.

Up to this point, the walking skeleton has been running in development mode. Once you’ve added meaningful features, you can deploy your application to production. To do that, you have to make a production build. The build gathers necessary frontend resources and dependencies. It then transpiles, minimizes and bundles them to make the application load faster.

Make a Production Build

In the walking skeleton, you use the Vaadin Maven plugin to make a production build. You do this by activating the production profile, like this:

./mvnw clean package -Pproduction

The production profile not only builds the frontend, but also excludes the development server bundle since it contains features that aren’t used in production.

Try It

Once the build has finished, check the target directory. If your skeleton was named my-application, you should find a file called my-application-1.0-SNAPSHOT.jar. Start the application from the JAR by running the following command:

java -jar my-application-1.0-SNAPSHOT.jar

The application should start up in production mode. Try it out by navigating to: http://localhost:8080

Stop the application by pressing Ctrl-C.