Search code examples
mavenvaadinvaadin7

vaadin-maven-archetype - Why does it generate three modules?


I used the vaadin-archetype-application-multimodule listed here and discussed on on this wiki page.

The archetype generated a project with three sub modules, myproject-production myproject-ui and myproject-widgetset. I am not sure the purpose of each project. For example myproject-production & myproject-ui both are war projects.

I am not sure which parts of my code should go where. Can someone please explain to me the usage of each of the projects?


Solution

  • From the generated README.md:

    • parent project: common metadata and configuration
    • xxx-widgetset: widgetset, custom client side code and dependencies to widget add-ons
    • xxx-ui: main application module, development time
    • xxx-production: module that produces a production mode WAR for deployment

    For background: with Vaadin you essentially develop web applications with server-only Java code. This is the "UI" code, which runs on the server and communicates behind the scenes with a kind of "thin client" running in Javascript on the browser (this is the "widgetset"). Normally you don't need to worry but for more advanced things you may create/derive/extend widgetsets. This would go in the Widgetset project.