I'm building a java web application with Vaadin, which generates some config files on maven build. For some unknown reasons, only a part of the generated files in WEB-INF are present on the when trying to full publish to Wildfly in Eclipse. (In particular, WEB-INF/classes/META-INF/VAADIN/config/stats.json is not present which results in an error in the Vaadin application.)
Several things that were tested
- Maven build does generate the file in the said location.
- Copying the War built by maven directly to /standalone/deployments results in a working application without error.
- After maven build and refresh in eclipse, the generated file is correctly shown in project explorer, indicating a successful refresh (right?)
- Another generated file in the same directory DO get copied (
flow-build-info.json). The difference between these two files may be, thatflow-build-info.jsonexists twice intarget, inclasses/META-INF/VAADIN...as well as in/[final name]/WEB-INF/classes/META-INF..., whilestats.jsononly exists in/[final name]/WEB-INF/classes/META-INF....
Used versions
- Eclipse version: 21.12 & 21.9
- JBoss AS, WildFly & EAP Server Tools: 3.9.106.v20210618-2025
- Wildfly 17, 20, 22
- Vaadin 14.7.5
I found out the problem: Maven build generates the Vaadin files just fine. However, if a maven update is executed afterwards in Eclipse before publishing to the server, the maven update would modify the
target/classesdirectory. This modification somehow removes all files but theflow-build-info.json(still don't understand this part). This results in the missing resources after publishing.So basically, maven build -> refresh in eclipse -> NO MAVEN UPDATE -> full publish works.