We are currently trying to migrate a Vaadin 13 project to Vaadin 14 with npm. As in Vaadin 14 the vaadin-maven-plugin is needed, we are also trying to migrate our Ant-Based build to maven.
Our project consists of > 10 different Applications, which are using a shared codebase.
We already migrated this project to Maven and Vaadin 13.
The project looks like this:
- Parent
-- Application-1 (needs Library-2 and Library-3)
-- Application-2 (needs Library-2 and Library-4)
-- Library-1 (needs Third_Party)
-- Library-2 (needs Library-1)
-- Library-3
-- Library-4
-- Third_Party (Maven-Module which imports 3rd-Party dependencies like vaadin, jetty etc.)
The vaadin-server is started as an embedded server using jetty.
Now we are trying to migrate this project to Vaadin 14 with npm but we couldn’t find a documentation for this kind of project.
The problem is that Library-1 contains custom Vaadin-Components (frontend JsModules and backend Java-Files) which are needed in other libraries and applications. Also all the modules might use or even extend some Vaadin-Components.
We already did all of the following:
- Move frontend-stuff to “src/main/resources/META-INF/resources/frontend” for Library-Modules.
- Move frontend-stuff to “frontend” for Application-Modules.
- Add vaadin-maven-plugin (goal: prepare-frontend) to either the parent module or the application module or all Modules which use or create Vaadin-Components.
When running the project, the frontend-plugin seems to generate the package.json and webpack-files but they don’t contain any of the required Vaadin-Components (eg. Vaadin-Button).
Also if we open the application in the browser, our custom components aren’t loaded.
So we are looking for some advice on how to migrate that kind of project to Vaadin 14 with npm.