简体   繁体   中英

Spring Boot - Deploy application to Google Cloud App engine but missing app.yaml

I have a problem which I am trying to solve this problem. I am trying to deploy spring boot application on google cloud app engine, but there is one problem when I try deploy the application I encounter this error below:

[INFO] --- spring-boot-maven-plugin:2.0.0.RELEASE:repackage (default) @ royAngularProject ---
[INFO]
[INFO] <<< appengine-maven-plugin:1.3.2:deploy (default-cli) < package @ royAngularProject <<<
[INFO]
[INFO] --- appengine-maven-plugin:1.3.2:deploy (default-cli) @ royAngularProject ---
[INFO] Deleting the staging directory: /home/meodows9992/royAngularProject-spring/target/appengine-staging
[INFO] Staging the application to: /home/meodows9992/royAngularProject-spring/target/appengine-staging
[INFO] Detected App Engine flexible environment application.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.292 s
[INFO] Finished at: 2018-12-09T19:39:14+08:00
[INFO] Final Memory: 22M/140M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy (default-cli) on project royAngularProject: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy failed: java.nio.file
.NoSuchFileException: /home/meodows9992/royAngularProject-spring/src/main/appengine/app.yaml -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
meodows9992@cloudshell:~/royAngularProject-spring (tidy-etching-224411)$  

May I know what should I do to resolve this issue, sorry I unable to post any codes because I don't know where is the problem located and if I need app.yaml I would like to guide me on how do I install it into my project.

A Standard app.yaml confguration for a maven project developed in java8 should look like this;

 runtime: java env : flex inbound_services: - warmup derived_file_type: - java_precompiled runtime_config: jdk: openjdk8 handlers: - url: /.* script: this field is required, but ignored skip_files: app.yaml

I believe the documentation of Google Cloud platform needs to be simplified.

Create the following location in your project - src/main/appengine and place your app.yaml file there.

Since it is a Java application you should mention that to get the app engine standard java environment.

runtime: java

在此处输入图片说明

Finally Run the below command if you already added the App engine plugin to your POM file.

./mvnw -DskipTests appengine:deploy

如果您打算部署 appengine-standard 应用程序,请检查您的 pom.xml 是否包含<packaging>war</packaging>而不是<packaging>jar</packaging>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM