简体   繁体   English

如何重新配置 Google App Engine Java 项目以使用 Maven?

[英]How to reconfigure a Google App Engine Java project to work with Maven?

I have a Google App Engine (Java) project that worked happily for many years.我有一个愉快地工作了很多年的 Google App Engine (Java) 项目。 Until the project format was changed to the Maven-based one.直到项目格式更改为基于 Maven 的格式。 Now I can't upload a single file to my project without going through the hell of reconfiguring the whole thing to work under Maven.现在,我无法将单个文件上传到我的项目,而无需重新配置整个工作以在 Maven 下工作。 It could have been an easy process if it was documented properly.如果记录得当,这可能是一个简单的过程。

I did find this page: https://cloud.google.com/appengine/docs/standard/java/tools/maven我确实找到了这个页面: https://cloud.google.com/appengine/docs/standard/java/tools/maven

It first says: make sure you have Java installed.它首先说:确保您安装了 Java。 Okay, I have it installed of course, for about 15 years.好的,我当然已经安装了大约 15 年。 And the very next step is: "Set the compiler flags in the pom.xml".下一步是:“在 pom.xml 中设置编译器标志”。 The question is: WHICH pom.xml?问题是:哪个 pom.xml? Where do I find it?我在哪里可以找到它? When I search, I can find dozens of pom.xml files, probably all of them under my Eclipse installation.当我搜索时,我可以找到几十个 pom.xml 文件,可能都在我的 Eclipse 安装下。

Is there some step-by-step guide explaining how to reconfigure an old Java Google App Engine project to work with Maven without assuming that I am already a Maven expert?是否有一些分步指南来解释如何重新配置旧的 Java Google App Engine 项目以与 Maven 一起使用,而无需假设我已经是 Z9115C10980645C41313F244AC1A3 专家?

In the link you have provided, under the " Creating a new project " section, it says "inside the directory where you created the project, you'll have a subdirectory named myapp, which contains a pom.xml file".在您提供的链接中,在“ 创建新项目”部分下,它显示“在您创建项目的目录中,您将有一个名为 myapp 的子目录,其中包含一个 pom.xml 文件”。 In addition to that, there is a visual diagram that helps you in locating the pom.xml file.除此之外,还有一个可视图可以帮助您找到 pom.xml 文件。

But most importantly, the link you have provided clearly states that it is deprecated .但最重要的是,您提供的链接清楚地表明它已弃用 This means that you should not follow it since it is no longer supported and will probably not work.这意味着您不应该遵循它,因为它不再受支持并且可能无法工作。

You should instead follow this tutorial: Using Apache Maven and the App Engine Plugin .您应该改为遵循本教程: 使用 Apache Maven 和 App Engine 插件

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

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