There are a few problems you encounter, and this material is too sensitive to configuration problems:
To solve problems, follow the instructions at https://cloud.google.com/endpoints/docs/frameworks/java/quickstart-frameworks-java
- Use the correct Google project identifier when replacing YOUR_PROJECT_ID in pom.xml. It must be a valid project identifier for all steps to work.
- When replacing YOUR-PROJECT-ID in echo.java
If the project ID is invalid (actually exists in AppEngine), the following steps will not work
- execute:
mvn exec:java -DGetSwaggerDoc - run:
gcloud service-management deploy openapi.json - execute:
export ENDPOINTS_SERVICE_NAME=echo-api.endpoints.<your project id>.cloud.goog
The quick start guide is not very useful for step 5. Step 4 should end with a successful message.
Finally, the sample comes with the Maven plugin, which does not seem to work with the new endpoints. Instead of using:
<plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>appengine-maven-plugin</artifactId> <version>${appengine.maven.plugin.version}</version> </plugin>
using:
<plugin> <groupId>com.google.appengine</groupId> <artifactId>appengine-maven-plugin</artifactId> <version>1.9.44</version> </plugin>
The answer to the question why mvn appengine: devserver does not work is that the devserver target does not exist in the new plugin. The old Maven plugin allows you to run: mvn appengine: devserver
รรณrir Gunnarsson
source share