Hot deploy: Theme variant change only applied after full Maven rebuild
See original GitHub issueHot deploy issue: happens with IDE (IntelliJ) which is able to reuse something (resources or classes?) from the original project location even though it’s deployed to the web server.
Vaadin 14.0.0.rc4
I have the skeleton starter app, with @Theme(value = Lumo.class, variant = Lumo.LIGHT)
added on the MainView
class. I recompile the project with mvn clean package
and launch the WAR file in Intellij+Tomcat. A white button on white background is properly shown.
Now I change the theme variant to dark as follows: @Theme(value = Lumo.class, variant = Lumo.DARK)
. The theme has not been changed, only the variant. I restart the Tomcat in Intellij, however the dark variant is not applied: the page still uses light theme, as can be seen on the body
element: <body theme="light">
. I need to run mvn clean package
again, in order to actually activate the dark theme. That doesn’t make any sense since the theme is webpacked in in both variants, as can be seen in a browser: simply change the body element to <body theme="dark">
to have the dark theme applied.
It should not be necessary to do mvn clean package
after the variant changes in the annotation - the change should be applied without having to run Maven.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
Alright, now I got this. So this is kind of hot deploy issue. We have a bunch of issues related to this kind of functionality. I will update the title, thanks.
Thanks! Yet I think it’s not necessarily a hot-redeploy: you can kill Tomcat, change the annotation and run Tomcat from scratch from Intellij, and the variant change would still not be applied to the app. A cold redeploy if you will 😃