@enablevaadin with production maven build dosen't load npmPackage or jsmodu

Afternoon all,
Looking for some help with a little bug i’m getting.

I have an app packaged as a Jar and included via maven into another project. In devmode everything is good. I use @enablevaadin on the package to load the routes.

But when I package for production and boot, the components labeled with jsmodule don’t display. This applies to Vaadin components as well.

If i include at least one reference to the component in my parent project it will all work as expected. But this means I’ve created a reference to each UI component of the referenced jar library in my main project.

I feel it may be happening at the build but I haven’t yet got into debugging maven addons.

I’m using V14.

Any ideas here? Even how to debug maven addons?

thanks heaps.

Hi Hayden,

What exact version of Vaadin are you using? Can you please try the latest which is 14.0.13? It includes some fixes that may be related to your issue.

I was on 14.0.11 and now have tried 14.0.13 but no luck.

I can see that build front end runs and only includes the npmPackage if I’ve inlcuded at least one reference in my main package.

My main package is

com.hd.spring.myproj.Application

I’ve prepared and included

com.hd.spring.simpleapp

as a Maven dependency, but the jar is a local source and dosen’t include a POM at all. Maybe I’ve built it wrong. I just used the eclipse export wizard.

I’ve used both

@Enablevaadin("com.hd.spring.myproj", com.hd.spring.simpleapp")
@ComponentScan("com.hd.spring.myproj", com.hd.spring.simpleapp")

and this works well in dev mode.

thanks for your help

Thanks Mehdi,

It was my error on maven. After splitting spring boot and the application then installing the application i was able to use it as a dependency in another application perfectly.

Thanks again for your help.

Glad to hear you figured it out :slight_smile: