【问题标题】:Git sample project "pubsub-appengine-sample" project is showing ERROR: Directories are not supportedGit 示例项目“pubsub-appengine-sample”项目显示错误:不支持目录
【发布时间】:2015-08-02 20:41:33
【问题描述】:

我从 git 存储库中获取了代码,并尝试按照 readme.md 指令运行该代码,但对于我获取 mojoException 没有任何帮助。我使用带有gcloud:rungcloud:deploy 命令的maven 作为项目运行。完整的细节错误信息如下---

Packaging webapp
[INFO] Assembling webapp [pubsub-appengine-sample] in [E:\OfficeCode\cloud-pubsub-samples-java-master\appengine-push\target\war]
[INFO] Processing war project
[INFO] Copying webapp resources [E:\OfficeCode\cloud-pubsub-samples-java-master\appengine-push\src\main\webapp]
[INFO] Webapp assembled in [78 msecs]
[INFO] Building war: E:\OfficeCode\cloud-pubsub-samples-java-master\appengine-push\target\war.war
[INFO] 
[INFO] <<< gcloud-maven-plugin:1.9.17:run (default-cli) @ pubsub-appengine-sample <<<
[INFO] 
[INFO] --- gcloud-maven-plugin:1.9.17:run (default-cli) @ pubsub-appengine-sample ---
[INFO] 
[INFO] Running gcloud app run...
May 21, 2015 2:19:38 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed E:\OfficeCode\cloud-pubsub-samples-java-master\appengine-push\target/war\WEB-INF/appengine-web.xml
[INFO] Running C:\python27_x64\python.exe -S C:\Program Files\Google\Cloud SDK\google-cloud-sdk/lib/googlecloudsdk/gcloud/gcloud.py --project=halogen-proxy-87911 preview app run E:\OfficeCode\cloud-pubsub-samples-java-master\appengine-push\target/war
[INFO] ERROR: Directories are not supported [E:\OfficeCode\cloud-pubsub-samples-java-master\appengine-push\target/war].  You must provide explicit yaml files.
[INFO] ERROR: (gcloud.preview.app.run) Errors occurred while parsing the App Engine app configuration.
[ERROR] Error: gcloud app xxx exit code is: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.938 s
[INFO] Finished at: 2015-05-21T14:19:54+05:30
[INFO] Final Memory: 17M/179M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven-plugin:1.9.17:run (default-cli) on project pubsub-appengine-sample: Error: gcloud app xxx exit code is: 1 -> [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/MojoExecutionException 

建议我做错了什么?代码来源是Git仓库链接如下

https://github.com/GoogleCloudPlatform/cloud-pubsub-samples-java/tree/master/appengine-push

【问题讨论】:

    标签: maven google-app-engine google-cloud-pubsub


    【解决方案1】:

    感谢您的报告,并对损坏表示抱歉。我会尽快解决这个问题。

    编辑(5 月 23 日):现在 gcloud maven 插件再次工作。请从 repo 中提取最新的更改。不幸的是,本地模拟器上的身份验证现在不起作用。暂时,您可以将应用程序部署到云(mvn gcloud:deploy)以查看应用程序是否正常工作。本地身份验证问题解决后,我会更新。

    【讨论】:

    • 仍然不适合我:code 无法执行目标 org.apache.maven.plugins:maven-checkstyle-plugin:2.15:check (validate) on project pubsub-appengine-sample: 失败在 checkstyle 执行期间:Checkstyle 6.1.1 使用 checkstyle.xml 规则集报告了 11 个错误。 -> [帮助 1] [错误] [帮助 1] cwiki.apache.org/confluence/display/MAVEN/…
    • checkstyle:check 阶段对我来说已经过去了。你修改了源代码吗?如果是这样,请查看这 11 个错误并修复它们,以便应用能够运行。
    • 谢谢 现在我可以毫无问题地运行代码了。 checkstyle 在“长度行”和“文件末尾的换行符”中显示错误,我使用 &lt;module name="LineLength"&gt; &lt;property name="severity" value="ignore" /&gt; &lt;/module&gt; 并选择默认 eclipse Window>preference>checkStyle default sun_checks_eclipse.xml 忽略了该错误。
    • 仍有一些疑问:1. 部署的应用程序采用默认时间 20150527t111213 作为版本,即使我在 appengine.xml 中提到版本 =10 2. 加载资源加载失败:服务器响应状态为pubsub.js 的 404(未找到)---------------- angular.min.js:29 未捕获的错误:[$injector:modulerr] errors.angularjs.org/undefined/$injector/…...ogleapis.com%2Fajax %2Flibs%2Fangularjs%2F1.2.0%2Fangular.min.js%3A32%3A427)
    • 我无法重现该问题。我认为您在部署之前对 repo 进行了一些更改。你能和我分享一下变化吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-10
    • 1970-01-01
    • 1970-01-01
    • 2010-12-28
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多