为什么Maven无法运行此构建运行?

时间:2016-08-31 20:05:57

标签: maven firebase

当进入教程 Build an Android App Using Firebase and the App Engine Flexible Environment 时,我得到了一个我无法解决的Apache Maven 3.3.9 Exception

在教程中必须运行

  

火力-的AppEngine-后端

示例,这就是我的问题的原因。

以下是Exception

[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.90.v20151210:run (default-cli) on project backend: Execution error: org.apache.maven.plugin.MojoExecutionException: Error: cannot execute gcloud command java.io.IOException: Cannot run program "python.exe": CreateProcess error=2, Det går inte att hitta filen -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.google.appengine:gcloud-maven-plugin:2.0.9.90.v20151210:run (default-cli) on project backend: Execution error: org.apache.maven.plugin.MojoExecutionException: Error: cannot execute gcloud command java.io.IOException: Cannot run program "python.exe": CreateProcess error=2, Det går inte att hitta filen
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at 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)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)Caused by: org.apache.maven.plugin.MojoExecutionException: Execution error: org.apache.maven.plugin.MojoExecutionException: Error: cannot execute gcloud command java.io.IOException: Cannot run program "python.exe": CreateProcess error=2, Det går inte att hitta filen
    at com.google.appengine.gcloudapp.GCloudAppRun.execute(GCloudAppRun.java:305)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    ... 20 more[ERROR][ERROR] Re-run Maven using the -X switch to enable full debug logging.

它说无法运行Pyton.exe,但我有

  

C:\ Users \ sven \ AppData \ Local \ Google \ Cloud SDK \ google-cloud-sdk

它安装正确,Pyton也在那里。另外,我以管理员身份运行CMD。

如何解决此问题并运行以下内容?

  

firebase-appengine-backend示例

1 个答案:

答案 0 :(得分:0)

我确实使用Google Cloud SDK Shell而不是Windows 10 CMD窗口解决了这个问题。

我将云SDK安装到:

  

C:\ GoogleCloudSDK \ Cloud SDK \ google-cloud-sdk

并像这样运行:

  

mvn gcloud:run -Dgcloud.gcloud_directory =“C:\ GoogleCloudSDK \ Cloud SDK \ google-cloud-sdk”

但这又出现了另一个错误:

  

python.exe:无法打开文件'C:\ GoogleCloudSDK \ Cloud SDK \ google-cloud-sdk / platform / google_appengine / dev_appserver.py':[Errno 2]没有这样的文件或目录

平台文件夹下不存在 google_appengine 文件夹?

dev_appserver.py位于:

C:\GoogleCloudSDK\Cloud SDK\google-cloud-sdk\bin

gcloud info

Google Cloud SDK 124.0.0
bq 2.0.24
bq-win 2.0.24
bundled-python 2.7.10
core 2016.08.29
core-win 2016.08.05
gcloud
gsutil 4.21
gsutil-win 4.20
powershell 0.1.5
windows-ssh-tools 2016.05.13