2 Replies Latest reply: May 10, 2012 10:36 AM by Beat Fluri RSS

Errai Project as a Multi-Module Maven Project

Beat Fluri Newbie

I'm trying to split up the Errai KitchenSink project into a multi-module Maven project with

  • kitchensink-shared (client.shared with a separate GWT module)
  • kitchensink-client (client.local, inherited the shared GWT module in the KitchenSink module)
  • kitchensink-server (controller, util)
  • kitchensink-war (builds the war for deployment)

In our team, we prefer such a split because we separate development according to this structure and we'd like to have different Jenkins Jobs for testing the modules independently.

 

In kitchensink-client I managed to get the GWT-part compiling by using <compileSourcesArtefacts> to take kitchensink-shared into the GWT compilation. I also managed to deploy the war file including server classes and GWT compiled Javascript. The output of the JBoss AS 7 log is the same as when deploying the original (single project) KitchenSink application. Opening KitchenSink.html in the browser shows the static and the GWT related widgets but fails when communicating with the server (see screenshot). You can see in the console, that the application throws a RuntimeException.

 

kitchen-sink-runtimeexception.png

 

Can anybody help me in figuring out what I missed when splitting the projects into modules? What problem could cause communicate failure?

 

Remarks:

  • If do not split KitchenSink it works perfectly
  • The REST part of KitchenSink works perfectly
  • I created the Errai KitchenSink project using the following Maven archetype command:

mvn archetype:generate -DarchetypeGroupId=org.jboss.errai.archetypes -DarchetypeArtifactId=kitchensink-quickstart -DarchetypeVersion=2.0.0.Final -DarchetypeRepository=https://repository.jboss.org/nexus/content/groups/public/

and changed the version of org.jboss.spec.jboss.javaee6 to 3.0.1.Final since the version that the archetype is requesting does not exist anymore.