Migrating to Google Cloud Endpoints v2

614 views Asked by At

I am currently using Cloud Endpoints v1 in an existing application, but I would like to update it to v2 for App Engine in Java. I have reviewed the migration guide, but this only provides steps for migrating a Maven project. I am not using Maven, but I am using the Java App Engine SDK and Google Eclipse plugin to develop, test, and deploy my endpoints. I am having trouble getting v2 of the Cloud Endpoints Framework to run due to conflicts with the existing dependencies in the App Engine SDK. How can I override the v1 dependencies in the App Engine SDK so that I can migrate to v2? Is this possible, or should I convert my project to a Maven project?

2

There are 2 answers

3
saiyr On

I believe GPE is deprecated. However, you should be able to right click on your App Engine project, select Build Path > Configure Build Path, and add the endpoints-framework JAR under the Libraries tab. Make sure to go to Order and Export and move the endpoints-framework above the App Engine SDK, or you're likely to encounter issues.

1
Ken On

In order to override the include appengine-endpoints.jar from the App Engine SDK for Java, I added a class-loader-config to the appengine-web.xml.

<classloader-config> <priority-specifier filename="endpoints-framework-2.0.3.jar/> </class-loader-config>

I've also disabled the Google Cloud Endpoint Builder in Eclipse. Properties>Builders and unchecked Google App Engine Cloud Endpoints Builder.