Basil Bourque
Basil Bourque

Reputation: 338835

Create a new Vaadin Flow 16/17 project using plain Java Servlets without Spring/CDI

The starter page for Vaadin Flow has changed. That page now offers new projects configured only for Spring Boot. The previous version of this page offered an option for "Plain Java Servlet" as well as Spring/CDI.

The Vaadin documentation suggests using a Maven archetype manually. But the Maven repositories for com.vaadin… appear to be aimed at Vaadin 8 and earlier, with none for Vaadin 10 and later.

The Vaadin page on learning Maven shows an example using viritin-vaadin-flow-archetype as an archetype. But Viritin is a third-party project, and would add libraries I do not presently need.

➥ Is there an avenue to start a new Vaadin 16 project using only plain Java Servlets to be run on Jetty or Tomcat without Spring/CDI? (or Vaadin 17 pre-release)

Or has the Vaadin Ltd company decided to support only Spring now? (That would be most unfortunate.)

Upvotes: 0

Views: 485

Answers (2)

Basil Bourque
Basil Bourque

Reputation: 338835

Hello World Starters page

See the Hello World Starters page on the Vaadin.com site. There you will find several starter projects. Some involve Spring, and some do not.

Those without Spring include:

  • Vaadin – Plain Java (just Servlet, no Spring, no CDI, built by Maven)
  • Vaadin – CDI
  • Vaadin – Quarkus
  • Vaadin – Gradle

You will find those across multiple versions of Vaadin.

Some versions of Vaadin also support:

  • Vaadin – OSGi
  • Vaadin – Karaf

screenshot of Hello World Starters offering the downloads mentioned above

Upvotes: 0

Alejandro Duarte
Alejandro Duarte

Reputation: 1479

At least the Maven archetype vaadin-archetype-application seems to be working for versions up to v16:

mvn archetype:generate -DarchetypeGroupId=com.vaadin -DarchetypeArtifactId=vaadin-archetype-application -DarchetypeVersion=LATEST

I should update that tutorial... thanks for the hint on this.

Upvotes: 3

Related Questions