Add Vaadin to Java Maven Project

So you don’t have maven in your path?

you mean I have to add it to my system variables like JAVA_HOME?

works now. Also had to update npm

If I try to compile the application I do this with mvn clean package -Pproduction?

I tried this on the skeleton-starter-flow application and got the error for the
“skeleton-starter-flow-24/src/main/java/org/vaadin/example/[1,1] class, interface, enum oder record expected”

Is that because I haven’t wrote any code in it yet or is this something else I have to configure to be able to compile my application?

vpackage org.vaadin.example;

import com.vaadin.flow.server.PWA;
import com.vaadin.flow.theme.Theme;

@PWA(name = "Project Base for Vaadin", shortName = "Project Base")
public class AppShell implements AppShellConfigurator {

If that’s your whole class; it’s missing package and imports

That command (mvn) is correct to build a production release (if you also configured your pom.xml) accordingly

That v in the beginning looks irritating

yeah… it was the v… Must have accidentally typed it at some point.

Now it created these folders in “target”. But which of these files is the executable now? The project-base-1.0-SNAPSHOT.war?
In the docs it says it either creates a .war or a .jar
I think it’s the .jar I want?

There is nothing executable; it’s a servlet application (war) - I’ve got the feeling you are totally new to the web development world: if yes, I would highly recommend to go with and use that defaults with spring boot instead of mingling with wars, servlet containers and other stuff.

Well, I’m creating (or better want to create) a small local application with an integrated database (already added a sqlite db via maven that works) that I can run and use to manage some data. On another server I asked what people would recommend to use to create the User interface for such an application and JavaFX and Vaadin were recommended.
And I thought using the browser window as UI with the benefits that already come with a browser window would be better than creating a desktop UI.
But I also have the feeling that this is going into the wrong direction.
I don’t plan to set up an online server or run any web application in the cloud etc.

If you wanna use the browser, it needs a “Backend” - that can be your locally running spring boot app with Vaadin or something totally different in the cloud or somewhere else

yeah, I somewhat expected my java application that I start via exe to start the db and also open the UI in the browser which would then be handled by vaadin, which handles user interaction and calls my java “backend” code etc.

That sounds more like spring boot; even tho it won’t start “real” databases - except things like H2 or derby

Lke this: ?

there I’m just wondering again where the database comes into play that stores my created and edited data between runs and maybe let’s me make backups of it.
Currently I have sqlite database integrated via maven dependencies that creates a local file.db that contains the database and can be copies and backed up. well… it’s doable; like with any other in memory db it can be configured go save on the disc at exit or in between

I’ll take a look at it. Thank you for all your help :+1: