Hilla-React-Multi-Module

I am trying to adapt a project with hilla react, where I have a main application with only front and main. Outside, several subfolders where each one has its own pom and jar, but the main application can’t find the path to generate the respective views for the frontend. How can I get this multi-module style to work?

Are you using Hilla 1.3 ?

If yes, you need to set

com.vaadin.experimental.hillaEngine=true

feature flag. See here for more information regarding feature flags.

https://hilla.dev/docs/lit/reference/feature-flags#editing-the-properties-file

If you are using Hilla 2.0, the new documentation is still under revision. I can cite here a section of the Configuration Guide that will be published soon:


Use multi-module projects or endpoints from external dependencies

By default, Hilla searches for endpoints in your application only. You can extend the search to other modules of your project, or even to dependencies, like the SSO Kit.

The Hilla Maven plugin can be configured to list the Java packages that contain the endpoints. That list should always include the main application package and can include any number of other packages as needed.

If your application is in a package named com.example.application, you have another module containing endpoints in com.example.module, and you want to use some third-party endpoints in com.acme.module, you can configure the plugin as follows:

dev.hilla hilla-maven-plugin ${hilla.version} com.example.application com.example.module com.acme.module

Note

Endpoints and Spring dependencies
If the endpoints coming from outside of the main application have autowired Spring dependencies, make sure that Spring can find them, otherwise Hilla will try to instantiate them using a default no-arguments constructor, which will not trigger dependency injection.

I am trying with hilla 2. I really appreciate everyone’s help, I’ve been trying for a couple of months now. I will try with the plugin configuration, if it doesn’t work I will try with hilla 1.3. Thanks for the clarifications.