How to build a Vaadin Multi-Modules Maven Project?

Hi All,

I’m trying to build a big Vaadin project structured with maven. I’m facing with the problem of building the war of the application from a sub-modules which uses as dependencies some other sub-modules, all of these belong to the same parent project. The widget-set compilation is started from the pom that builds the war and at the end everything seems ok but when running under tomcat it come out an error while trying to instantiate some views placed in these modules dependencies. This is my project structure:

– Parent POM (packaging type: pom)

----- Common (packaging type: jar) : declares the vaadin.jar dependencies

----- Module1 (packaging type: jar): depends on Common.jar

----- Module2 (packaging type: jar): depends on Common.jar

----- Module3 (packaging type: jar): depends on Common.jar

----- Project (packaging type: WAR): depends on Common.jar, Module1.jar, Module2.jar and Module3.jar.

Has anyone ever tried to build a Vaadin maven project in this way???. Please help.

What is the error?

I’d suggest moving the Vaadin dependency to the subproject that creates the war file. That works for me. Then in your war’s WEB-INF/lib dir you should have the Vaadin jar file along with Module1.jar, Module2.jar, etc.

Cheers,
Bobby