带有 maven 开发服务器的 Google App Engine Java 失败:缺少“guestbook/target/guestbook-1.0-SNAPSHOT”
Posted
技术标签:
【中文标题】带有 maven 开发服务器的 Google App Engine Java 失败:缺少“guestbook/target/guestbook-1.0-SNAPSHOT”【英文标题】:Google App Engine Java with mvn devserver failed: missing "guestbook/target/guestbook-1.0-SNAPSHOT" 【发布时间】:2014-06-23 13:15:30 【问题描述】:我正在尝试通过简单的tutorial on Google App Engine with Java,但是当我尝试运行mvn appengine:devserver
命令时,我收到了这个奇怪的丢失目录错误:
[INFO] guestbook ......................................... FAILURE [ 0.228 s]
[INFO] guestbook-war ..................................... SKIPPED
[INFO] guestbook-ear ..................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.446 s
[INFO] Finished at: 2014-05-06T12:03:51-08:00
[INFO] Final Memory: 9M/176M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.4:devserver (default-cli) on project guestbook: The application directory does not exist : /Users/davidt/GoogleAppEngineProjects/guestbook/target/guestbook-1.0-SNAPSHOT -> [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
发生了什么事?我应该什么时候创建那个快照?
注意:我不确定这是否重要,但我一直在同一个文件夹下多次删除和重新创建项目。
【问题讨论】:
【参考方案1】:您必须在guestbook-ear
文件夹中运行mvn appengine:devserver
。我在顶层运行它。
【讨论】:
没有ear文件夹怎么办? 这对我来说没有意义。 pom.xml 文件位于根文件夹中。你能详细说明吗?我是否需要 cd 进入 ear 目录,然后调用 mvn 以显式引用父目录中的 pom ? (您的示例没有显示这一点)这真的是 Google appenegine 团队的意图吗?这有记录吗?以上是关于带有 maven 开发服务器的 Google App Engine Java 失败:缺少“guestbook/target/guestbook-1.0-SNAPSHOT”的主要内容,如果未能解决你的问题,请参考以下文章