- Apache Maven (3.3.9 or greater) OR Gradle (4.2.1 or greater)
- Google Cloud SDK
gcloud components install app-engine-javagcloud components update
Use either:
gcloud initgcloud auth application-default login
Set your project, the plugins in this example are configured to use this value from gcloud
gcloud config set project <YOUR_PROJECT_NAME>
We support building with Maven, Gradle, IntelliJ IDEA, and Eclipse. The samples have files to support both Maven and Gradle. To use the IDE plugins, see the documentation pages above.
Using Maven and the App Engine Plugin & Maven Plugin Goals and Parameters
$ mvn package
$ mvn cargo:run
- In the
pom.xml, update the App Engine Maven Plugin with your Google Cloud Project Id:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.2.0</version>
<configuration>
<projectId>myProjectId</projectId>
<version>GCLOUD_CONFIG</version>
</configuration>
</plugin>
Note: GCLOUD_CONFIG is a special version for autogenerating an App Engine
version. Change this field to specify a specific version name.
$ mvn package appengine:deploy
Using Gradle and the App Engine Plugin & Gradle Tasks and Parameters
$ gradle tomcatRun
$ gradle appengineDeploy