Skip to content

Configurable class scanning when running from IDE #21191

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
mshabarov opened this issue Mar 28, 2025 · 0 comments
Open

Configurable class scanning when running from IDE #21191

mshabarov opened this issue Mar 28, 2025 · 0 comments

Comments

@mshabarov
Copy link
Contributor

mshabarov commented Mar 28, 2025

Describe your motivation

Configurable class scanning for Maven showed a good performance gain in prepare-frontend and build-frontend maven goals for building frontend. Whereas this is enough for production builds, it would be more handy in development to have the same feature when running / debugging from IDE, where maven plugin does not come onto stage, so that you can exclude what not need a scanning and have faster restarts and reloads.

Describe the solution you'd like

Having similar configuration properties that one can setup in application.properties for example:

vaadin.frontend.scanner.includes=com.example:my-addon,com.foo:bar
vaadin.frontend.scanner.excludes=com.example:backend
vaadin.frontend.scanner.includeOutputDirectory=false

Describe alternatives you've considered

This feature does a similar exclusion that vaadin.(allowed|blocked)-packages properties do in Spring add-on, so maybe we could re-use them or enhance a bit. Alternative is to just port (allowed|blocked)-packages parameter to non-Spring configurations if the same optimised scanning can be achieved with (allowed|blocked)-packages.

Additional context

There are some complications like:

  • In dev mode we do not have a centralised piece like the FrontendDependencies classes
  • There are several ServletContainerInitializers that handles found classes
  • Spring add-on adds its own logics for vaadin.(allowed|blocked)-packages
  • To expand a bit the logic around the Vaadin package.properties file to allow add-ons auto-detection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant