Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Creating and Configuring the Project

To create a new project, you'll need to use an App Engine-provided Maven App Engine artifact called appengine-skeleton-archetype , as described in Creating the project . The App Engine Maven artifact is what creates the project layout and files required to deploy and run on App Engine.

After project creation, you'll need to configure the new project, as described in Configuring the project .

Creating the project

To create the project:

  1. Change to a directory where you want to build your project.

  2. From the command line invoke Maven as follows:

    mvn archetype:generate
    
  3. When prompted to Choose a number or apply filter , supply the value com.google.appengine.archetypes:skeleton-archetype to display a short list of archetypes matching the filter.

  4. When prompted to Choose a number or apply filter , supply the number displayed for the value remote -> com.google.appengine.archetypes:appengine-skeleton-archetype , which currently is the number 1 .

  5. When prompted to Define value for property 'groupId' , supply the value com.google.appengine.demos .

  6. When prompted to Define value for property 'artifactId' , supply the value guestbook .

  7. When prompted to Define value for property 'version' , accept the default value.

  8. When prompted to Define value for property 'package' , accept the default value.

  9. When prompted to confirm your choices, accept the default value (Y).

  10. Wait for the project to finish generating. At this point, the basic project layout with required files is complete. Inside the directory where you created the project, you'll have a subdirectory named guestbook , which contains a pom.xml file and two subdirectories: guestbook-ear and guestbook-war , similar to the layout shown here:

    Maven Project Layout

    We'll describe what to do inside these two subdirectories later. (Notice that the location where you'll add your own Java source code is inside guestbook-war/src/main/java .)

Now you are ready to configure the project.

Configuring the project

To configure the project:

  1. You'll need a project ID in order to deploy your app to production App Engine. Create a new project as follows:

    1. Visit Google Developers Console in your web browser, and click Create Project .
    2. Supply the project name Guestbook and accept the project ID that is auto-generated for you.
    3. Click Create .

    Make a note of the project ID, since you'll need it in the next step.

  2. Return to the terminal window for your Maven project, and edit the file guestbook/guestbook-ear/src/main/application/META-INF/appengine-application.xml , so that the element <application> contains the project ID you just obtained above.

  3. Edit guestbook/pom.xml in the main application directory so that <appengine.target.version> inside the <properties> element points to the most recent App Engine SDK version. Currently, this is 1.9.9.

    Your completed work should look like this:

    <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <appengine.target.version>1.9.9</appengine.target.version>
    </properties>
    
  4. In the main app directory guestbook , invoke Maven as follows to make sure the project is buildable:

    mvn clean install
    

    You should get a success message [INFO] BUILD SUCCESS .

You are now ready to add your own application code and UI.

Adding Application Code and UI >>

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.