Enterprise Integration Zone is brought to you in partnership with:

Ir. Charles Moulliard is a Sr. FuseSource Architect - Consultant and Apache Committer with more than 18 years of expertise in design of solution based on J2EE / .NET technologies. As a Solution Architect, he has been involved in system integration of client projects in Financial and Banking world. The skills (Methodology, UML, RUP, Project Management - Prince2, Telecommunication, Network, Security, Web Development, Programming languages, RDBMS, Architecture - J2EE/SOA, Middleware) that he acquires during its career path have help him to address business, functional, security and infrastructure requirements and transpose them into operable and efficient solutions. He is also fascinated to train people on new emerging technologies like SOA, OSGI, J2EE and ESB and provide consultancy for FUSE clients. As an Apache Committer he contributes since several years on the projects Apache Camel, Karaf and ServiceMix and uses these technologies as standards for integration projects. He is the author of the Camel Bindy DataFormat. Charles has posted 8 posts at DZone. You can read more from them at their website. View Full User Profile

Run a Google Web Toolkit 2 project on Apache Karaf/ServiceMix

01.11.2013
| 2345 views |
  • submit to reddit

To simplify the development of Web projects on Apache Karaf/Apache ServiceMix, we have created archetypes to setup WAR or WAB projects. They are very basic but they can be enriched with framework like Struts 2, Wicket, plain JSP or MyFaces JSF as they are currently supported on Apache Karaf - ServiceMix.

For the GWT users, it exists now an archetype which will create a GWT project. To create such a project, you must generate a project from the archetype

mvn archetype:generate \
   -DarchetypeGroupId=org.ops4j.pax.web.archetypes\
   -DarchetypeArtifactId=wab-gwt-archetype \
   -DarchetypeVersion=2.0.0-SNAPSHOT \
   -DgroupId=com.mycompany \
   -DartifactId=hello \
   -Dversion=1.0


build next the WAB using hello/mvn clean install

and deploy it on Apache Karaf


Verify that the web site is well registered :


Next, you can navigate to your application in your browser and click on the button to say Hello.


Remark : A WAB project is nothing more than a WAR excepted it is packaged as a bundle file, that we have removed the WEB-INF/lib dependencies and create a MANIFEST file containing the OSGI instructions.
Published at DZone with permission of its author, Charles Moulliard. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)