哪个App Engine Maven插件使用? [英] Which App Engine Maven Plugin to use?
问题描述
根据谷歌自己的一些网站(
),谷歌App Engine最近一直在与Google App Engine合作,偶然发现了一些对我来说很神秘的东西, a href =https://cloud.google.com/appengine/docs/java/tools/maven =nofollow noreferrer> https://cloud.google.com/appengine/docs/java/tools/maven )您应该使用 < plugin>
< groupId> com.google.appengine< / groupId>
< artifactId> appengine-maven-plugin< / artifactId>
< version> $ {appengine.maven.plugin.version}< / version>
< / plugin>
并根据其他网页( https://cloud.google.com/appengine/docs/java/tools/maven-reference )你应该使用
< plugin>
< groupId> com.google.cloud.tools< / groupId>
< artifactId> appengine-maven-plugin< / artifactId>
< version> 1.1.0-beta< / version>
< / plugin>
现在我对我应该使用哪个方面感到困惑。为什么有两个版本在第一位?
我面对的问题:
似乎支持不同的目标。一个支持部署等,另一个支持更新和update_cron。
我需要全部3个目标,任何方式都可以让他们拥有一个依赖关系?
预先感谢,希望有人能帮助我。
Sascha
< plugin>
< groupId> com.google.appengine< / groupId>
< artifactId> appengine-maven-plugin< / artifactId>
< version> $ {appengine.maven.plugin.version}< / version>
< / plugin>
第一个基于以前的(但不推荐使用) appcfg
(或 Java SDK
)。
它提供很多目标专用于App Engine,这些基础设施包括开发服务器和部署,还用于更新队列,更新cron,更新索引,真空索引等。
< plugin>
< groupId> com.google.cloud.tools< / groupId>
< artifactId> appengine-maven-plugin< / artifactId>
< version> 1.1.0-beta< / version>
< / plugin>
这是最新版本,仍处于测试阶段。它基于 GCloud SDK
并且有一组有限的目标。
这里您可以看到来自Maven Central的最新版本,最新版本是 1.0.0
,我没有看到 1.1.0-beta
版本
如何选择正确的插件:
如果您只需要使用 dev-server
和 deploy
您可以使用基于 GCloud SDK
的最新插件。
这两个目标也可以在基于 appcfg
的插件中使用,但是如果您需要更多特定目标(如处理队列,cron,索引等)与此最后一个。
此外, Google Cloud Endpoints目标仅适用于 appcfg
一个
最后,这两个插件可以在同一个项目中共存。使用它们的技巧是使用目标完整路径而不是短路径( 例如: 如果使用较短版本,Maven无法解析正确的groupId(因为artifactId在两个插件上都是相同的) 目前,两个插件都可以运行,并且没有关于 以我为例,我总是使用GCloud插件中的部署(我认为它略微好一些部署过程与appcfg相比),但是当我需要更新cron /队列时,我使用前一个插件的目标。我没有任何问题,因为我的项目里面都存在这两个问题。 请记住,如果您想使用基于GCloud的项目,则需要在您的本地机器上安装了(和配置)的GCloud。 以下是讨论同一主题的另一个主题:`gcloud app deploy` vs.`appcfg .py` been working with Google App Engine lately and stumbled upon something that is a mystery to me, maybe you can clarify. According to some of Google's own websites (https://cloud.google.com/appengine/docs/java/tools/maven) you should use and according to some other pages (https://cloud.google.com/appengine/docs/java/tools/maven-reference) you should use Now I am really confused as to which I should use. Why are there two versions in the first place? Problem I am facing: The both seem to support different goals. One supports deploy etc. and the other one update and update_cron. I need all 3 of those goals, any way I can have them with one dependecy? Thanks in advance, hope someone can help me with this. Sascha The first one is based on the previous (but not deprecated) It offers a lot of Goals specific for App Engine, the basic ones with the dev-server and the deploy, but also for update queues, update cron, update indexes, vacuum indexes, ... It's the newest one, still in beta. It is based on Here you can see the latest version from Maven Central, the latest one is How to choose the proper plugin:
If you only need to use Those 2 goals are also available in the Also, the Google Cloud Endpoints goals, are only available to the At the end, those 2 plugin can coexists in the same project. The trick to use both of them is using the goal full path instead of the short one (source). For example: And not If you use the shorter version, Maven is unable to resolve the proper groupId (because the artifactId is the same on both plugins) For the moment both plugins are operative and there is not trace of a deprecation about the Take me for example, I always use the deploy within the GCloud plugin (I consider it slighty better as deploy procedure compared to the appcfg one), but when I need to update cron/queues I use the goal of the previous plugin. I do not have any problem on having both on them inside my project Remember that if you want to use the GCloud based one, you need to have GCloud installed (and configured) on your local machine. Here is another thread which is discussing the same topic: `gcloud app deploy` vs. `appcfg.py` 这篇关于哪个App Engine Maven插件使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
com.google.cloud.tools:appengine-maven-plugin:run
$ p>而不是
appengine:run
appengine:devserver
appcfg
为基础。
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.maven.plugin.version}</version>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.1.0-beta</version>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.maven.plugin.version}</version>
</plugin>
appcfg
(or Java SDK
). <plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.1.0-beta</version>
</plugin>
GCloud SDK
and has a limited set of goals.1.0.0
, I don't see the 1.1.0-beta
versiondev-server
and deploy
you can use the newest plugin based on GCloud SDK
.appcfg
based plugin, but if you need more specific goals (like handling queue, cron, indexes, ...) are only available with this last one.appcfg
one
com.google.cloud.tools:appengine-maven-plugin:run
com.google.appengine:appengine-maven-plugin:devserver
appengine:run
appengine:devserver
appcfg
based one.