尝试在appengine
上部署应用时遇到以下异常mvn gcloud:deploy [错误gcloud app命令退出代码为:2]
退出代码2在这里意味着什么?
堆栈跟踪
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.121.v20160815:deploy (default-cli) on project userprofilev2: Error: gcloud app command exit code is: 2 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException:无法执行目标com.google.appengine:gcloud-maven-plugin:2.0.9.121。 v20160815:在项目userprofilev2上部署(default-cli):错误:gcloud app命令退出代码为:2 在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) 在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) 在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) 在org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) 在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) 在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) 在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) 在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) 在org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) 在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) 在org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:497) 在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) 在org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) 在org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 引起:org.apache.maven.plugin.MojoExecutionException:错误:gcloud app命令退出代码是:2 在com.google.appengine.gcloudapp.AbstractGcloudMojo.startCommand(AbstractGcloudMojo.java:463) 在com.google.appengine.gcloudapp.GCloudAppDeploy.execute(GCloudAppDeploy.java:43) 在org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) 在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ......还有20个
答案 0 :(得分:0)
使用'gcloud components update'命令升级gcloud版本,解决了我的问题