A project example for a Vaadin application that only requires a Servlet 3.1 container to run (no other JEE dependencies). The UI is built with Java only.
The easiest way of using it is via https://vaadin.com/start - you can choose the package naming you want.
The project can be imported into the IDE of your choice, with Java 21 installed, as a Maven project.
The project is following the standard Maven project layout.
To compile the entire project, run "mvn install" in the project root.
Other basic workflow steps:
- getting started
- compiling the whole project
- run
mvn installin project root
- run
- developing the application
- edit code in src/main
- run
mvn - open http://localhost:8080/
- creating a production mode war
- run
mvn package
- run
- running in production mode
- run
mvn jetty:run-war - open http://localhost:8080/
- run
Integration tests are implemented using TestBench. The tests take a few minutes to run and are therefore included in a separate Maven profile. To run the tests using Google Chrome, execute
mvn verify -Pit
and make sure you have a valid TestBench license installed. If the tests fail because of an old Chrome Driver or you want to use a different browser, you'll need to update the webdrivers.xml file in the project root.
Profile it adds the following parameters to run integration tests:
-Dwebdriver.chrome.driver=path_to_driver
-Dcom.vaadin.testbench.Parameters.runLocally=chromeIf you would like to run a separate test make sure you have added these parameters to VM Options of JUnit run configuration
vXwhere X is the largest number is the latest version of the starter, using the latest platform version