简体   繁体   English

Appengine:后端API教程,无法构建项目

[英]Appengine: Backend API Tutorial, cannot build project

I have completed the Java Tutorial for Google App Engine. 我已经完成了Google App Engine的Java教程。 Now I wanted to do the Backend API Tutorial, but I get errors.. 现在,我想做后端API教程,但出现错误。

I installed Maven and I was able to generate the project from the command line with maven as described in "Creating an Endpoints Backend Project". 我安装了Maven,并且能够按照“创建端点后端项目”中的说明从命令行使用maven生成项目。 I have problems with the next step: Configuring the Maven Project for Endpoints . 我在下一步中遇到问题: 为端点配置Maven项目

Under the point "Setting required plugin configuration" it says "2. Locate and replace the default appengine-maven-plugin configuration entirely with the following: ", before they were talking about the pom file from "helloendpoints/helloendpoints-war". 在“设置所需的插件配置”下显示“ 2.找到并完全替换为以下默认的appengine-maven-plugin配置:”,然后他们才开始谈论来自“ helloendpoints / helloendpoints-war”的pom文件。

--> But in that pom.xml-file from "helloendpoints/helloendpoints-war", I cannot locate that configuration... I found that in the pom file of "helloendpoints/helloendpoints-ear". ->但是,在“ helloendpoints / helloendpoints-war”的pom.xml文件中,我找不到该配置...我在“ helloendpoints / helloendpoints-ear”的pom文件中找到了该配置。

Question 1: Is this (in ear-folder) the pom-file that i shall edit or should there be that configuration in the pom from the war folder? 问题1:这是我将要编辑的pom文件(在耳夹中),还是war文件夹中的pom中应该有该配置?

However, replacing that code there or not both gives me an error when I invoke maven with "mvn install". 但是,当我用“ mvn install”调用maven时,是否在那里替换该代码都会给我一个错误。

The error-message is the following: "Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war on project helloendpoints-war: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.3:war failed: basedir C:\\Users...\\helloendpoints\\helloendpoints-war\\target\\generated-sources\\appengine-endpoints does not exist". 错误消息如下:“无法在目标helloendpoints-war上执行目标org.apache.maven.plugins:maven-war-plugin:2.3:war:目标org.apache.maven.plugins的执行默认-war: maven-war-plugin:2.3:war失败:C:\\ Users ... \\ helloendpoints \\ helloendpoints-war \\ target \\ generated-sources \\ appengine-endpoints不存在”。 And I can see that in "...\\helloendpoints-war\\target", there is no "generated-sources"-folder! 而且我可以看到在“ ... \\ helloendpoints-war \\ target”中没有“生成源”文件夹!

And this is where I am stuck now. 这就是我现在所困的地方。

Question 2: Can all this be done without Maven and is there any tutorial for that? 问题2:没有Maven就能完成所有这些工作吗,是否有任何教程? Because that is another source of errors and I had to deal with enough errors now... I just want to get an understanding of how the appengine works, how I can use it for my android app and then start from a WORKING basic-project, but I already had to deal with lots of errors. 因为那是错误的另一个来源,所以我现在必须处理足够的错误...我只是想了解一下appengine的工作原理,如何将其用于我的android应用,然后从WORKING基本项目开始,但是我已经不得不处理很多错误。 This is pretty frustrating, because I just wanted to do what is told in the tutorial and I still did not write any own code yet... 这非常令人沮丧,因为我只想按照本教程中的说明去做,而我仍然没有编写任何自己的代码...

Question 3: In the next part of the tutorial , are they using the m2e-plugin or anything? 问题3:在本教程的下一部分中 ,他们使用的是m2e插件还是其他工具? Because that was mentioned nowhere, but somehow you have to import that maven project into eclipse... 因为没有人提到它,但是您必须以某种方式将那个Maven项目导入eclipse ...

Yes you can do it without Maven . 是的,没有Maven您就可以做到。 This and this are simple tutorials from Google that shows you how to add a backend to an Android project. 是从谷歌简单的教程,告诉您如何到后端添加到Android项目。

I would suggest to delete this topic, because I switched to the tutorial without Maven, which has not much to do with my original post. 我建议删除该主题,因为我切换到了没有Maven的教程,这与我的原始文章没有多大关系。 That tutorial works now, but I cannot explain what solved it. 该教程现在可以运行,但是我无法解释解决了什么。 I think this whole topic is more confusion and also wasted time for anyone else, who is trying to find an answer here. 我认为这整个主题更令人困惑,也浪费了其他人在这里寻找答案的时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM