Deploying an App Engine application to the Java runtime

This page describes how to deploy your Maven project to the Google App Engine flexible environment Java runtime.

This runtime provides a JDK and no web server. Your application must generate a runnable fat JAR from the mvn package command that includes all necessary dependencies and starts up from the main() method.

Before you begin

You need a Google Cloud Platform project with an App Engine application to deploy to. If you don't have one, use the Cloud Platform Console to set up your project:

Go to GCP Console

  1. Select or Create a new GCP project.

  2. Select the region where you want your app located.

Deploy your project

To deploy your project to the flexible environment:

  1. In the Project Explorer, right click the project you want to deploy.

  2. Open the context menu, and select Properties.

  3. In the sidebar, select Project Facets.

    1. If your project is not faceted, click the Convert to faceted form... link to display the available facets.
  4. Select the App Engine Java Flexible Environment (JAR) facet checkbox.

    A dialog box to select facets for the project. It provides a list of
 facets available for the project. In the screenshot, the App Engine Java
 Flexible Environment (JAR) and Java facets are selected.

  5. Click OK.

  6. In the Package Explorer or Project Explorer, select the project you want to deploy.

  7. Click the Google Cloud Platform toolbar button .

  8. Select Deploy to App Engine Flexible in the drop-down menu.

    A dialog pops up.

    A dialog box to configure the deployment. It provides a drop-down menu
 to select an Account, a list of Projects to deploy to, a field displaying
 the path to the app.yaml file, a button to Browse to a new app.yaml file, a
 checkbox to Promote the deployed version to receive all traffic, a checkbox
 to Stop previous version, a checkbox to include optional App Engine
 configuration files, an expansion panel for Advanced options, and a field
 for entering a Staging bucket.

  9. Select the Account you want to deploy with, or add a new account. To add a new account:

    1. Select <Add a new account...> in the Account drop-down menu.

      A new browser window opens to complete the sign in process.

    2. Select the correct account to use.

    3. Click Allow and close the browser window.

  10. In the Project field, select the Google Cloud Platform project you want to deploy to.

  11. In the app.yaml field, click Browse to select your app.yaml file if it is not in the default src/main/appengine/ directory.

  12. If you want to keep the current version running and manually promote the new version later using gcloud or the Google Cloud Platform Console, clear the Promote the deployed version to receive all traffic checkbox.

  13. If you don't want to stop the previous version, clear the Stop previous version checkbox.

  14. Click Deploy.

A background job launches to deploy the project to App Engine. The output of the job is visible in the Eclipse Console view.

What's next

Send feedback about...

Cloud Tools for Eclipse
Need help? Visit our support page.