Hi,
This is a follow-up post for https://vaadin.com/forum/t/urgent-production-build-failed/178117: sometimes the production build is marked as successful, but after starting the 24.7 app, the following error occurs for the first visible view, the login view:
The component class de.hub28.hwg.isplaner.security.LoginView includes '@vaadin/login/src/vaadin-login-overlay.js' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a @Uses(LoginView.class) where it is used.
Today I was able to isolate the issue. I make two subsequent Maven build runs, with two different log files, using the command:
mvn clean -Dmaven.test.skip -Pproduction package -Djarfile=isplaner -Dorg.slf4j.simpleLogger.showDateTime=false -X >maven.log && java -jar target/isplaner.jar --spring.profiles.active=default
For the failed run, it seems that my own Java classes are not collected/found by the Vaadin Maven plugin. The log files differ in the output of:
[INFO] --- vaadin:24.7.7:prepare-frontend (default) @ isplaner ---
List of npm dependencies found in the project:
Only the log file for the successful variant shows my own project files found, something like this:
[INFO] --- vaadin:24.7.7:prepare-frontend (default) @ isplaner ---
List of npm dependencies found in the project:
- @vaadin/app-layout 24.7.8 de.hub28.hwg.isplaner.MainLayout
- @vaadin/login 24.7.8 de.hub28.hwg.isplaner.security.LoginView
The log file for the failed version is missing those lines, contains only something like
- @vaadin/accordion 24.7.8 com.vaadin.flow.component.accordion.Accordion
I have a MVE (minimal viable example) that makes the issue somewhat reproducible.
DM me for providing a zip with the MVE.
Any suggestions, why sometimes the project files are not handled ?
Kind regards
Dominik