Sunday, December 29, 2013

Google App Engine Project using Maven

Since folks from google have created the archetypes for Google App Engine Web projects it is takes seconds to actually create a sample web application and deploy it!
In the post I am going to show you how to do just that, read on..
#Create a maven project using app engine archetype 
mvn archetype:generate -Dfilter=com.google.appengine:

#Select an archetype of choice 
#At the time of writing this blog post, following are the options available
Choose archetype:
1: remote -> com.google.appengine.archetypes:appengine-skeleton-archetype (-)
2: remote -> com.google.appengine.archetypes:guestbook-archetype (-)
3: remote -> com.google.appengine.archetypes:skeleton-archetype (-)
4: remote -> com.google.appengine.demos:guestbook-archetype (-)

Note: Run the following maven commands inside the project directory where the .pom exists
#Verify the demo application
mvn verify

#Start the app engine devserver on your machine 
mvn appengine:devserver

#Test the demo application locally
http://localhost:8080

#Update the 'appengine-web.xml' with the following details
{appengine.app.id}
${appengine.app.version}

####### Deploy the application on app engine 
mvn appengine:update

#The END!
Now you will be able to use the app url and access the application default being
http://{appengine.app.id}.appspot.com
https://{appengine.app.id}.appspot.com


No comments:

Post a Comment