David Chandler's Journal of Java Web and Mobile Development

  • David M. Chandler

    Web app developer since 1994 and Google Cloud Platform Instructor now residing in Colorado. Besides tech, I enjoy landscape photography and share my work at ColoradoPhoto.gallery.

  • Subscribe

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 224 other followers
  • Sleepless Nights…

    June 2011
    S M T W T F S
  • Blog Stats

    • 1,035,335 hits

Preserving the Datastore when using App Engine dev server with Maven

Posted by David Chandler on June 25, 2011


I’m currently working on a GWT+GAE Maven project and the local datastore gets wiped every time I start the dev server, whether using mvn clean gae:run or Google Plugin for Eclipse.


Per the official dev server doc, the local datastore is stored in WEB-INF/appengine-generated/local_db.bin. For most Maven projects, the WEB-INF directory is located under target/${project.build.finalName}, so local_db.bin is under the target directory, which gets wiped every time you mvn clean. It also gets wiped when launching dev mode with Google Plugin for Eclipse.


Specify an alternate path to the dev server datastore.

In Eclipse, edit the project’s Run Configuration and add this to the VM args:


This will put the local datastore in the project root directory, where it won’t get wiped every time you launch the dev server.

In the project’s POM, add this to the configuration section for maven-gae-plugin:


Many thanks to Marcel Overdijk for pointing the way on the maven-gae-plugin group.

4 Responses to “Preserving the Datastore when using App Engine dev server with Maven”

  1. Thank you very much!! That is it!

  2. […] Preserving the Datastore when using App Engine dev server with Maven […]

  3. mike corbridge said

    Four years later …. do you know of a solution using a Gradle build system. I am using Android Studio 1.0.2, and I am taking advantage of the generators that create all the build scripts. But like everyone else, my local_db.bin is getting erased every time I make a change to my servlet.

    Thank you
    Toronto, Canada

  4. jreim said

    Still great info, thanks for keeping this up!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: