Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unrecognized element '<runtime>' when upgrading Google App Engine to Java 8

I have a Google App Engine Standard server running Java 7, and would like to upgrade to Java 8. I have added <runtime>java8</runtime> to my pom.xml as follows:

<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <application>my-app</application>
    <version>1.0</version>
    <threadsafe>true</threadsafe>
    <runtime>java8</runtime>
    ...

This was described in https://cloud.google.com/appengine/docs/standard/java/runtime-java8#specifying_the_java_8_runtime_for_your_app.

However when building the application, it fails with the error Unrecognized element <runtime>. Can anyone advise?

like image 249
user2181948 Avatar asked Oct 17 '22 05:10

user2181948


1 Answers

You should probably be using an old version of appengine sdk currently. Check whether you have the latest version of appengine-api dependency.

I use following appengine-api and it works fine for me.

<dependency>
    <groupId>com.google.appengine</groupId>
    <artifactId>appengine-api-1.0-sdk</artifactId>
    <version>1.9.58</version>
</dependency>
like image 129
Lahiru Chandima Avatar answered Oct 21 '22 04:10

Lahiru Chandima