Blog

Vaadin 6.1 goes to Maven and adds Google App Engine support

By  
Sami Ekblad
Sami Ekblad
·
On Sep 10, 2009 9:34:00 AM
·

Vaadin for Maven Users

It is now easy for Maven users to enhance their web projects with Vaadin user interfaces. The latest 6.1 version of the Vaadin Java web library is now available also for Maven users, via the Maven central repository.

Here is a small usage sample:

mvn archetype:generate -DarchetypeGroupId=com.vaadin 
-DarchetypeArtifactId=vaadin-archetype-sample 
-DarchetypeVersion=LATEST 
-Dpackaging=war  
-DgroupId=myGroup 
-DartifactId=myArtifact 
-Dversion=1.0-SNAPSHOT

 

Google App Engine Support

Another great addition is the support for Google App Engine. This means that you can deploy your Vaadin applications in Google App Engine directly. Build and deploy your applications from Eclipse using the Vaadin plugin for Eclipse.

You have two different ways of using Vaadin together with the Google App Engine:

Using the Google Plugin for Eclipse:

  1. Create a new "Web Application Project" (Google's project type)
  2. Uncheck "Use Google Web Toolkit"
  3. Copy vaadin-6.1.0.jar to war/WEB-INF/lib
  4. Add vaadin-6.1.0.jar to the build path
  5. Add <sessions-enabled>true</sessions-enabled> to appengine-web.xml
  6. Create an application
  7. Set up web.xml to use GAEApplicationServlet and the created application
  8. Deploy

Pretty straight-forward. The only disadvantage is that the refactoring features of the Vaadin plugin are no longer available.

Another way is to use the Vaadin plugin for Eclipse to create the project:

  1. Create a new "Dynamic Web Project".
  2. Enable "Vaadin Configuration"
  3. Set webcontent directory to "war" on page 2.
  4. Open project preferences
  5. Check "Use Google App Engine" in Google/App Engine
  6. Fix the error in the project by using Ctrl-1 and Finish (adds appengine-web.xml)
  7. Add <sessions-enabled>true</sessions-enabled> to appengine-web.xml
  8. Modify the web.xml to use GAEApplicationServlet instead of ApplicationServlet
  9. Deploy the example application

In addition to these new features the 6.1.0 version of Vaadin contains client-side and server-side performance optimizations. For more information, please take a look at the official release notes.

Download Vaadin 6.1 here.

Sami Ekblad
Sami Ekblad
Sami Ekblad is one of the original members of the Vaadin team. As a DX lead he is now working as a developer advocate, to help people the most out of Vaadin tools. You can find many add-ons and code samples to help you get started with Vaadin. Follow at – @samiekblad
Other posts by Sami Ekblad