Skip to content

Part of frontend/generated is deleted when making a change to pom.xml in VS Code #21515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Artur- opened this issue May 23, 2025 · 1 comment

Comments

@Artur-
Copy link
Member

Artur- commented May 23, 2025

Description of the bug

Setup:

  • New project from start.spring.io with only Vaadin
  • Changed to use frontend hotdeploy
  • Run using the application class in VS Code

After the app has fully started, a space is added anywhere in pom.xml and pom.xml saved.

This causes some files in the frontend/generated folder to be deleted and then ends up in the infinite loop described in #21464

The reason is that prepare-frontend has a lifecycle mapping for M2E (Eclipse and VS Code) so that changing pom.xml triggers prepare-frontend. As the project has configured frontend.hotdeploy in application.properties, the Maven build has no idea about that and assumes the default bundle will be used (or something similar). Then a lot of files are deleted and nothing works.

Expected behavior

The generated folder always has the needed files

Minimal reproducible example

As described above

You can trigger the problem manually by running mvn and then running mvn vaadin:prepare-frontend with the server running

Versions

  • Vaadin / Flow version: 24.8-SNAPSHOT
@Artur-
Copy link
Member Author

Artur- commented May 23, 2025

We already once tried removing the lifecycle mapping in #13302 but that was later reverted as "Debug on Server" in Eclipse no longer works without it. If we make another solution for "Debug on Server", e.g. a hook in an Eclipse plugin that creates the build file with a link to the project directory, then we can remove the lifecycle mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Normal Priority (P2)
Development

No branches or pull requests

2 participants