Gwt and Maven Jetty Plugin

Gwt and Maven Jetty Plugin

The Maven Gwt Plugin is a powerful tool in developing Gwt applications using Maven Build Management. I have set up my development environment to code and run JUnit test in eclipse IDE (without using eclipse IAM etc but the Maven Eclipse Plugin instead), and I test gwt code using the Maven Gwt Plugin, either using the gwt:run or gwt:test goals.

In combination with the Maven Jetty Plugin it is very easy to deploy Maven dependent Gwt applications into an exploded war or a packed war. Below the required plugins plus versions as well as some sample commands.

Required Plugins

Maven War Plugin




Maven Gwt Plugin (see repository location)




Maven Jetty Plugin



Pom.xml Settings

The jetty server instance will require gwt-servlet.jar. Below a convenient way to define this archive as additional dependency.







Maven War Plugin configuration











Deploying & Running

Run jetty from the exploded project contents in your project's directory with your Gwt application.

mvn gwt:compile jetty:run –Djetty.port=9990

Deploy Gwt application to a packaged war:

mvn war:war

(should trigger goal gwt:compile)

Extract a generated war and run the exploded war contents in jetty.

mvn jetty:deploy-war –Djetty.port=9998