Java 7 runtime support on App Engine standard was deprecated on December 13, 2017 and will be shut down entirely on January 16, 2019. It is replaced by the Java 8 Runtime Environment.
Samples for the Java 8 runtime can be found here.
This sample demonstrates how to use the Logs API on Google App Engine.
The Logs API only generates output for deployed apps, so this program should not be run locally.
This example uses the Maven gcloud plugin.
In the following command, replace YOUR-PROJECT-ID with your Google Cloud Project ID and SOME-VERSION with the desired version number.
$ mvn appengine:update -Dappengine.appId=YOUR-PROJECT-ID -Dappengine.version=SOME-VERSION
To save your project settings so that you don't need to enter the parameters, you can:
-
Update the tag in src/main/webapp/WEB-INF/appengine-web.xml with your project name.
-
Update the tag in src/main/webapp/WEB-INF/appengine-web.xml with a valid version number.
You will now be able to run
$ mvn appengine:update
without the need for any additional parameters.