Vaadin 24 - Theme Issue

Dear all

I am experiencing the following error from time to time. I think our setup and theme structure according to should be correct. Any hints where this could come from and how to address it?

Appreciate any support!

Could not execute build-frontend goal: Theme ‘xy’ should not exist inside a jar and in the project at the same time.

It would help to identify the culprit if you could share your structure, otherwise it’s close to impossible

ebill-ui is our maven module for the vaadin ui

Why are there two frontend folders? Only the upper one should be needed

the one under resources/frontend is for another reason. naming is confusing as it appears to be an overlap, which is not. it should not colide. error points to duplicate theme folder/files. which i don’t get by now.

“is our maven module” took me by confusing - so this module is a dependency of another module you are later deploying / starting?

basically we have


  • ebill-ui (here is the vaadin ui)
  • ebill-services* (simplified, multiple business logic module ← some of them are used by ebill-ui)
  • ebill-app (this is what bundles the whole application together and also starts the spring boot app)

what is worth mentioning - the structure and project setup works. no issues on our ci/cd pipeline.

it is just that in some scenarios on local dev machine that we are encountering the theme issue or other little issues where we need to clean / rebuild. i think it is more a tooling issue. and I try to understand where this comes from to get rid of it

Personally I would get rid of this by moving the theme to the real spring boot app - like it’s intended to be used. If you go with the jar path to get realiable results a parent / children theme association should be needed where your current theme is moved in the meta inf and a “dummy” frontend theme in your main app is created. I personally don’t know of any online example where your current approach is advertised.

the intent is to have a the UI in a separated module. I agree in not having seen an example of this structure, but I did not expect any issues with this approach, as I am simply separating the maven modules.

thought maybe this error would be something others know. will dig deeper. thank you for your help.

Out of curiosity: while your app is running, can you change something in your theme’s styles.css without restarting / rebuilding? is vite’s live reload catching those changes?

haven’t tested recently and need to fix my issue first before I can test

@quirky-zebra yes live reload does work