【发布时间】:2015-10-20 04:31:27
【问题描述】:
我刚刚开始学习使用 Java 对 Google App Engine 应用程序进行编程,并从 Udacity 课程 ud859-master 下载了一个示例。当我运行 第 2 课 > helloWorldEndpoit 时,我收到了这个错误。
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.808 s
[INFO] Finished at: 2015-07-29T14:08:21+05:00
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.4:endpoints_get_discovery_doc (default) on project helloworld: Execution default of goal com.google.appengine:appengine-maven-plugin:1.9.4:endpoints_get_discovery_doc failed: A required class was missing while executing com.google.appengine:appengine-maven-plugin:1.9.4:endpoints_get_discovery_doc: com/google/api/server/spi/config/Api
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.google.appengine:appengine-maven-plugin:1.9.4
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/error/.m2/repository/com/google/appengine/appengine-maven-plugin/1.9.4/appengine-maven-plugin-1.9.4.jar
[ERROR] urls[1] = file:/C:/Users/error/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[2] = file:/C:/Users/error/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
[ERROR] urls[3] = file:/C:/Users/error/.m2/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar
[ERROR] urls[4] = file:/C:/Users/error/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[5] = file:/C:/Users/error/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M2a/org.eclipse.sisu.inject-0.0.0.M2a.jar
[ERROR] urls[6] = file:/C:/Users/error/.m2/repository/asm/asm/3.3.1/asm-3.3.1.jar
[ERROR] urls[7] = file:/C:/Users/error/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.16/plexus-interpolation-1.16.jar
[ERROR] urls[8] = file:/C:/Users/error/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.10/plexus-utils-3.0.10.jar
[ERROR] urls[9] = file:/C:/Users/error/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[10] = file:/C:/Users/error/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[11] = file:/C:/Users/error/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[12] = file:/C:/Users/error/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
[ERROR] urls[13] = file:/C:/Users/error/.m2/repository/com/google/guava/guava/14.0.1/guava-14.0.1.jar
[ERROR] urls[14] = file:/C:/Users/error/.m2/repository/com/google/appengine/appengine-tools-sdk/1.9.4/appengine-tools-sdk-1.9.4.jar
[ERROR] urls[15] = file:/C:/Users/error/.m2/repository/com/google/appengine/appengine-local-endpoints/1.9.4/appengine-local-endpoints-1.9.4.jar
[ERROR] urls[16] = file:/C:/Users/error/.m2/repository/com/google/appengine/appengine-endpoints/1.9.4/appengine-endpoints-1.9.4.jar
[ERROR] urls[17] = file:/C:/Users/error/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.9.4/appengine-api-1.0-sdk-1.9.4.jar
[ERROR] urls[18] = file:/C:/Users/error/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar
[ERROR] urls[19] = file:/C:/Users/error/.m2/repository/eu/infomas/annotation-detector/3.0.1/annotation-detector-3.0.1.jar
[ERROR] urls[20] = file:/C:/Users/error/.m2/repository/org/slf4j/slf4j-nop/1.7.5/slf4j-nop-1.7.5.jar
[ERROR] urls[21] = file:/C:/Users/error/.m2/repository/org/apache/maven/shared/maven-invoker/2.0.11/maven-invoker-2.0.11.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: com.google.api.server.spi.config.Api
[ERROR] -> [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/PluginContainerException
我想知道如何解决这个问题。
【问题讨论】:
-
你使用的是什么版本的 Maven?
-
@TimBiegeleisen 使用 maven 版本 3.3.3
-
虽然文档说什么 > 3.1.0 应该可以工作,但值得用 3.1.0 进行测试,看看是否有关于您正在使用的示例代码或 SDK maven 目标 @987654323 @ 基于此失败。
标签: java maven google-app-engine