I try to deploy spring boot + vaadin 14 on wildfly installed on debian. I set up ci using gitlab.
image: java:8
stages:
- undeploy
- build-frontend
- deploy
before_script:
- chmod +x mvnw
undeploy:
stage: undeploy
tags: [runner-production]
script: ./mvnw -e -X wildfly:undeploy
build frontend:
stage: build-frontend
tags: [runner-production]
script: ./mvnw -e -X vaadin:prepare-frontend vaadin:build-frontend
production:
stage: deploy
tags: [runner-production]
script:
./mvnw -e -X wildfly:deploy
only:
- master
When maven doing vaadin:build-frontend in logs it writes
Updated /home/gitlab-runner/builds/a41nNuzA/0/a.charov/admin/target/frontend/generated-flow-imports-fallback.js
[INFO]
Updated /home/gitlab-runner/builds/a41nNuzA/0/a.charov/admin/target/frontend/generated-flow-imports.js
Emitted /home/gitlab-runner/builds/a41nNuzA/0/a.charov/admin/target/classes/META-INF/VAADIN/config/stats.json
Build was success, but files do not appear in these directories. When I access the site I get Internal server error. In wildfly’s log
java.io.IOException: The stats file from webpack (stats.json) was not found undefined
The application is running in production mode.Verify that build-frontend task has executed successfully
and that stats.json is on the classpath.Or switch application to development mode
How can I fix it?
Command ./mvnw -e-X vaadin:prepare-frontend vaadin:build-frontend should generate js scripts and settings in json files. When gitlab launches it, the runner writes in the logs that everything is generated, but this does not actually happen. Only if you run the command manually via sudo. How to configure vaadin:build-frontend in debian? The problem seems to be with the rights of users who run commands.