无法使用Maven生成App Engine datastorecallbacks.xml

时间:2014-01-16 11:48:17

标签: java google-app-engine maven google-cloud-datastore

我正在尝试将现有的App Engine应用程序迁移到Maven但是我遇到了生成datastorecallbacks.xml的问题,因此我尝试使用本教程从头开始创建项目:https://developers.google.com/appengine/docs/java/tools/maven然后补充道:

@PostPut(kinds = {"Greeting"})
void updateCache(PutContext context) {
    Entity greeting = new Entity("Test", "test");
    DatastoreService datastore =
        DatastoreServiceFactory.getDatastoreService();
    datastore.put(greeting);
}

完整的源代码可以在这里找到:https://github.com/bogdan-nourescu/AppEngineMavenTest

构建失败并显示以下错误消息:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myapplication 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myapplication ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Bogdan\IdeaProjects\test9\myapplication\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ myapplication ---
[INFO] Compiling 1 source file to C:\Users\Bogdan\IdeaProjects\test9\myapplication\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: Datastore Callbacks: java.lang.RuntimeException: Unable to read META-INF/datastorecallbacks.xml
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.421s
[INFO] Finished at: Thu Jan 16 13:41:43 EET 2014
[INFO] Final Memory: 17M/216M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project myapplication: Compilation failure
[ERROR] error: Datastore Callbacks: java.lang.RuntimeException: Unable to read META-INF/datastorecallbacks.xml
[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/MojoFailureException

我在pom.xml中缺少什么才能正确生成datastorecallbacks.xml?

0 个答案:

没有答案