Closed cheppsn closed 4 years ago
Update So I did some remote debugging and found the following problem:
Since we're using Vaadin in a sub-project of a multi-module project, the vaadin code will be packaged as a separate module jar inside the spring-boot jar/dist zip.
This results in a resource path like jar:file://projects/.../server/application/build/libs/server-app-M17.9d1be5e.jar!/BOOT-INF/lib/vaadin-ui.jar!/META-INF/VAADIN/config/flow-build-info.json
where vaadin-ui.jar
is the library module that contains our frontend code.
Unfortunately resources with two jar!
parts like this are explicitly ignored in DeploymentConfigurationFactory.java#L354 and therefore PROD mode is not activated at runtime.
So this is not a problem of the plugin, it is a problem of Vaadin -> I'll file a bug there.
Setup
Description We are building a multi-module spring-boot application (with Vaadin only being used in a single module of that application).
When I execute
gradlew clean vaadinBuildFrontend build
and then run the application from my IDE (IntellJ) everything works as expected, the server starts with Vaadin in PROD mode.However, when I execute the above and then either use
bootRun
or the start script of the generatedbootDistZip
, then Vaadin starts indeveloper
mode and will executenpm install
etc. during startup:I'm not sure how to debug this and whether the problem is caused by the Vaadin gradle plugin or by our multi-module build.