September 10, 2010

Spring 3 + maven2 + Google App Engine: Part 4 [Deployment]

Now you should have an easy application that is working and you'd like to deploy to Google's servers. Let's take a look at the appengine-web.xml file located in the project's /WEB-INF folder. This file contains all of the settings related to the appengine web application.

Here is an example appengine-web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="">
    <!--  This variable is defined in your POM file -->
        <property name="java.util.logging.config.file" value="WEB-INF/classes/"/>
        <include path="/site/**" expiration="1d 12h" />

Notice that the application node is filled out with your unique Google App Engine application name which was created during the creation of the application.

If you take a look at part 2 of this series which goes more in depth on the POM file, you will notice at the bottom of the file there are several properties/variables set. One of these is the application version, which correspond to the different versions you can deploy to Google's servers. Notice that in the POM file, there are several version setup using different profiles. When you deploy your application, you can setup different version numbers for testing, integration builds, staging or other required environments. The deployed version will follow the following URL format:

For a version of "0":

For a version of "2":

I recommend using the "0" version for testing, "1" for staging and "2" for production. This allows you to release to test and stage versions of your application, which will still use the same database, without releasing to production.

Now, onto how to deploy. If you have been following this series, you will be using the GAE plugin for Maven, which comes with many handy goals. Using the "gae:deploy" will deploy your application to the Google servers according to the appengine-web.xml file.

NOTE: I recommend creating batch files to deploy your application. Here is a very basic example of a bash script file:

mvn gae:deploy -Dmaven.test.skip=true -Prelease-build

I have set the profile to "release-build" and decided to skip my test when doing my releases. Typically you will need to provide your email and password on the Google App Engine account to deploy.

Lastly, once your have a successful deployment, follow these directions.

  1. Check your application by using the URL format given above
  2. Once you have verified the version has been uploaded, goto, login and goto your application's main page
  3. Look for "Application Versions" and goto those settings
  4. Select the "2" to be your version to be the "default"

Congratulations, you have the necessary skills to create an application using Google App Engine and Spring 3.0!

Later post will give more insights and tricks that I have learned while developing a full application exclusively hosted on Google App Engine.


Eduardo Costa said...

You said: "If you take a look at part 2 of this series" - Could be easier with a direct link... :)

Unknown said...

Good idea! It's now done :-)

Sadhana Rathore said...

Learned a lot from your post and it is really good. Share more tech updates regularly.
ui ux design course in Chennai
ui design course in chennai
ui developer course in chennai
Ethical Hacking course in Chennai
Web Designing Course in chennai
Web development training in chennai
PHP Training in Chennai
ui ux design course in Anna Nagar
ui ux design course in Vadapalani
ui ux design course in Thiruvanmiyur

divi said...

thanks for your details it's very nice and useful web design company in velachery

Anbarasan14 said...

Thanks for your blog; I really prefer this blog for my future reference.
English Speaking Classes in Mulund
IELTS Classes in Mulund
German Classes in Mulund
French Classes in Mulund
Spoken English Classes in Chennai
IELTS Coaching in Chennai
English Speaking Classes in Mumbai
IELTS Classes in Mumbai
Spoken English Class in Anna Nagar
IELTS Coaching in Tambaram

kaushik said...

Awesome article! You are providing us very valid information. This is worth reading. Keep sharing more such articles.
Automation Anywhere Training in Chennai
Automation courses in Chennai
Machine Learning Training in Chennai
Blue Prism Training in Chennai
UiPath Training in Chennai
Automation Anywhere Training in OMR
Automation Anywhere Training in Porur
Automation Anywhere Training in T Nagar
Automation Anywhere Training in Velachery

The India said...

Delhi Mathura Vrindavan Tour by Bus
Agra Mathura Tour Package by Bus
Delhi to Agra tour by Volvo bus
Online Bus Ticket Booking for Agra
Same Day Agra Tour
Same Day Agra Tour by Bus

impressbss said...

Nice blog! Full of informative ideas. Thank you, keep sharing.
web design company in chennai

Adhuntt said...

Great blog thanks for sharing Searching for a SEO company in Chennai that can bring your brand to the top results page on Google? Look no further - Adhuntt Media, with their team of SEO experts, can make it happen that too for the best value.
digital marketing company in chennai

Pixies said...

Excellent blog thanks for sharing Pixies Beauty Shop is unlike any of the other cosmetic shops in Chennai. With tons of exclusive imported brands to choose from and the best value, this is the best shopping destination for your personal and salon needs.
Cosmetics Shop in Chennai

Bernot said...

Good information. Hiring the best digital marketing company leads to develop your business in a short period.
digital marketing company in chennai, SEO company in chennai, digital Marketing Agency

Indpac said...

Very useful blog thanks for sharing IndPac India the German technology Packaging and sealing machines in India is the leading manufacturer and exporter of Packing Machines in India.