GWT + OSGi + Maven

by Max Rohde,


Some steps and resources to set up a GWT project, which uses OSGi and Maven. However, these steps do not lead to a fully working GWT application. The main difficulty lies in the Server side, where the GWT servlets do not start up properly in the OSGi environment. I plan to implement the server using the Restlet framework, what should mitigate this problem.


Create a new GWT project in eclipse

Add a new XML file pom.xml to the project

pom.xml in github

Now you should be able to create eclipse metadata using the eclipse:eclipse goal as well as compile and start the GWT project using gwt:compile, gwt:...


Set up a new plugin project in eclipse for the gwt.user package.




... and add the GWT user package to this package to keep it seperate from the bundle with your application.

Now you can remove the dependency to the GWT user package from the pom above.


Run GWT hosted mode in OSGi:

Google Web Toolkit and Equinox (from eclipse wiki): (One project with an example GWT/OSGi project

Example project attempting to route GWT RPC calls to OSGi services:

Tutorial using the Servlet Bridge:

Overview developing web applications with OSGi (German)

Tutorial HttpService by example:

OSGi and GWT integration report:

Issue discussing calling GWT servlets hosted in a OSGi environment:

Categories: java