Hide
Java

Uploading Your Application

After you finish testing and running the app on the development server, which also generates required indexes, you need to upload the app to production App Engine.

To upload the app:

  1. Open the file guestbook/target/guestbook-1.0-SNAPSHOT/WEB-INF/appengine-generated/datastore-indexes-auto.xml in an editor and make sure that it contains the following:

    <datastore-indexes>
        <datastore-index kind="Greeting" ancestor="true" source="manual">
            <property name="date" direction="desc"/>
        </datastore-index>
    </datastore-indexes>
    

    Typically, you have to change source="auto" to source="manual".

  2. Change directory to guestbook, and invoke Maven as follows:

    mvn appengine:update
    
  3. The first time you upload, you'll be prompted to supply login information and you will be led through the login process via the browser. Follow the prompts. You may need to copy the success code from the browser into the command line at the end of the login process. (This information is remembered after you do it once.)

  4. Wait for the upload to complete. If the upload succeeds, you'll see a message similar to this one:

    98% Uploading index definitions.
    
    Update for module default completed successfully.
    Success.
    Cleaning up temporary files for module default...
    
  5. In your browser, visit the url https://<project-ID>.appspot.com to run the application hosted on App Engine, replacing <project-ID> with your project ID.