- Apache Maven 3.3.9 or greater
- Google Cloud SDK
gcloud components install app-engine-javagcloud components update
Use either:
gcloud initgcloud beta 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, and IntelliJ IDEA. 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 jetty:run-exploded
-
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.3.0</version> <configuration> <projectId>GCLOUD_CONFIG</projectId> <version>GCLOUD_CONFIG</version> </configuration> </plugin>Note:
GCLOUD_CONFIGis a special version for autogenerating an App Engine version. Change this field to specify a specific version name. -
Deploy your App
$ mvn package appengine:deploy
Using Gradle and the App Engine Plugin & Gradle Tasks and Parameters
$ gradle jettyRun
$ gradle appengineDeploy