multiple jars and production mode

Hello,

I use Vaadin 14.1.8 and Spring Boot 2.2.0.RELEASE. The website provides a module based interface. The main page is a Spring Boot application and is built with Maven. The modules (own Maven projects) implement an interface and are integrated into the website. I start the application as follows:

java -cp MainWebSite-1.0.0.jar;apps/;lib/ de.vaadin.main.Main

This works quite well. However, if the modules use Vaadin components that are not used in the main page (e.g. charts), they will not be displayed in production mode (Developer Mode it works). Can I build the production mode so that all Vaaadin components are included?

Greets,

Benjamin

Hi Benjamin

It sounds like [this issue]
(https://stackoverflow.com/a/59035219/3441504) / [github issue link]
(https://github.com/vaadin/flow/issues/6850), however I thought that has been fixed. To find out if is indeed this issue, could you try to add the following line to your main page and check if it then works?

private Chart unusedChart;

yes thats works… but the solution is not very nice…

I agree. Feel free to comment on the abovementioned github issue that it doesn’t yet work for you, and provide all possible information specific to your project and starting process. Maybe it doesn’t work for you because of your way of running the jar? I don’t have experience with starting applications through the command line, so I wouldn’t recognize the correct way of doing this.