实际上,我在Google云中还很陌生。因此,在将项目从本地部署到GCP时,出现以下错误。
我创建了springboot项目,并成功添加了appengine-maven-plugin和projectId。但出现错误。
插件
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.2.0</version>
<configuration>
<projectId>*******</projectId>
<version>1</version>
</configuration>
</plugin>
app.yaml
runtime: java
env: flex
handlers:
- url: /.*
script: this field is required, but ignored
错误:
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:2.2.0:deploy (default-cli) on project user-management-service: App Engine application deployment failed: com.google.cloud.tools.appengine.operations.cloudsdk.process.ProcessHandlerException: com.google.cloud.tools.appengine.AppEngineException: Non zero exit: 1 -> [Help 1]
答案 0 :(得分:0)
实际上,问题与版本有关。这就是为什么它收到类似INVALID_ARGUMENT的错误
的原因在pom.xml中提到version的GCLOUD_CONFIG参数后,它就可以工作了
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<version>GCLOUD_CONFIG</version>
<projectId>demo-project</projectId>
</configuration>
</plugin>