flow
flow copied to clipboard
running vaadin:prepare-frontend using directory dependency works, but jar dependencies filter away resources
Description of the bug
While developing in eclipse I use a dependency library I include this project locally. when prepare-runtime runs via maven the files from META-INF/frontend/ are ALL copied to the generated/jar-resources directory. Which is great and correct and all good things. But when a colleague who has not checked out the dependency from github is doing the same thing the files are copied from the jar file. However, for some unknown reason now only css, javascript and typescript are copied along. To me this is absolutely wrong, or at least should be documented clearly somewhere logical. Now, I had to investigate and debug the maven stuff and get all the way to here:
https://github.com/vaadin/flow/blob/main/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskCopyFrontendFiles.java#L43 which is used here https://github.com/vaadin/flow/blob/main/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskCopyFrontendFiles.java#L97
The use case is e.g. that I have several iconsets that are defined in svg files which are loaded in an init javascript. these all reside in a dependent library so we can share this among projects
Expected behavior
All files in the META-INF/frontend or otherwise META-INF/resources/frontend directories should be copied to generated/jar-resources on running vaadin:prepare-frontend goal in maven
Minimal reproducible example
Use a starter project add a dependent library with some frontend files which are not javascript, typscript or css, such as a svg file.
Versions
- Vaadin / Flow version: 24.4.3
- Java version: 21.0.3
- OS version: Windows 11
- IDE (if applicable): Eclipse 2024-06