Stay organized with collections Save and categorize content based on your preferences.
Apache Maven is a build automation tool for Java.
App Engine provides a Maven plugin that you can use to build and deploy your app to App Engine. The plugin does not support Enterprise Application Archive (EAR) projects.
Note: For information about other ways to build and deploy your app, see Testing and deploying your app. Before you startDetermine if Maven is installed and which version you have by running the following command:
mvn -v
If Maven is installed, a long string of information beginning with Apache Maven
and followed by a version number such as 3.9.1
will display.
If you don't have Maven 3.9.1 or newer installed:
Note: Linux users might need to download Maven instead of usingapt-get install
to install Maven 3.9.1 or newer.If you haven't already done so, follow the steps here to download the gcloud CLI, create your Google Cloud project, and initialize your App Engine app.
Install the gcloud CLI app-engine-java
component:
gcloud components install app-engine-java
To use the App Engine Maven plugin, add the following lines to the plugins
section in your project's pom.xml
file:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.8.1</version>
</plugin>
Note: If there is a newer version of the App Engine Maven plugin, you should upgrade to the latest version. Building and deploying your app
After you add the App Engine Maven plugin to your project's pom.xml
file, you can use the following command to build deploy your app:
mvn package appengine:deploy -Dapp.deploy.projectId=PROJECT_ID
Replace PROJECT_ID with the ID of your Google Cloud project. If your pom.xml
file already specifies your project ID , you don't need to include the -Dapp.deploy.projectId
property in the command you run.
The package
goal builds and packages your app, and the appengine:deploy
goal does the following:
Generates a unique version ID for the new version of your app.
Deploys the new version to App Engine.
Routes all traffic to the new version.
You can change the default deployment behavior by passing parameters in the appengine:deploy
command. For example, the following command deploys the service defined in your pom.xml
file to a specific Google Cloud project, assigns a custom version ID to the service, and turns off automatic traffic routing for the new version:
mvn appengine:deploy -Dapp.deploy.projectId=PROJECT_ID -Dapp.deploy.version=VERSION_ID -Dapp.deploy.promote=False
You can also use the appengine:deploy
command to deploy configuration files, such as cron.yaml
, dispatch.yaml
, and index.yaml
.
For more information, see the appengine:deploy
reference .
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Apache Maven is a build automation tool for Java, and App Engine provides a Maven plugin for building and deploying apps, excluding Enterprise Application Archive (EAR) projects."],["To use the App Engine Maven plugin, users must install Maven version 3.9.1 or newer and the gcloud CLI `app-engine-java` component."],["The App Engine Maven plugin can be added to a project's `pom.xml` file, and apps can then be built and deployed using the command `mvn package appengine:deploy -Dapp.deploy.projectId=PROJECT_ID`."],["The `appengine:deploy` goal generates a unique version ID, deploys the new app version to App Engine, and directs all traffic to the new version by default."],["The default deployment settings can be altered by passing parameters in the `appengine:deploy` command, such as specifying a custom project ID, version ID, or disabling automatic traffic routing."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4