How to deploy vaadin to a jar file

I write a common vaadin components, wanna to package it and sharing to other project.

But when i use mvn install -Pproduction , the frontend directory not auto build to *.jar/META-INF/frontend
So need to after package jar, copy frontend dir into /META-INF.

Dose have a easy way to solve it?

Hi,

Are you using Vaadin 14 ?

The resource for a jar file should be in this folder:
src/main/resources/META-INF/resources/frontend/

Is it the case?

You can find a starter for an Add-on Component in our starter: https://vaadin.com/start/v14

And also an example here (or in the source for most of the vaadin directory):
https://github.com/jcgueriaud1/custom-media-query

Here are explanations on where to store files:

https://vaadin.com/docs/v14/flow/importing-dependencies/tutorial-ways-of-importing.html#resource-cheat-sheet

Thanks Jean-Christophe Gueriaud and INPUTsys Chris Peter. I’m trying merge project into just downloaded Add-on Component project.