Skip to content

vincetse/google-appengine-getting-started-java-servlet

 
 

Repository files navigation

Build Status

Servlet based Hello World app for App Engine Flexible environment

Requirements

Setup

Use either:

  • gcloud init
  • gcloud 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.

Maven

Using Maven and the App Engine Plugin & Maven Plugin Goals and Parameters

Building

$ mvn package

Running locally

$ mvn cargo:run

Deploying

<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

Gradle

Using Gradle and the App Engine Plugin & Gradle Tasks and Parameters

Running locally

$ gradle tomcatRun

Deploying

$ gradle appengineDeploy

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%