将 playn 部署到 Google App Engine

发布于 2025-01-03 22:06:26 字数 490 浏览 1 评论 0原文

我已按照入门指南进行操作 - http://code.google.com /p/playn/wiki/GettingStarted - 但我被“在 App Engine 上运行新游戏”这一点所困扰。 该指南说“要在 Google App Engine 上运行您的游戏,我们可以使用 kindleit.net maven-gae-plugin。” 我已经查看了 http://www.kindleit.net/maven_gae_plugin/ 但不明白我应该做什么。

1)有人可以指出我需要做什么来获取/安装 maven-gae-plugin 的正确方向吗?我认为这是 Maven 的插件,但不知道该怎么做?

I have worked my way through the Getting Started guide -- http://code.google.com/p/playn/wiki/GettingStarted -- but am stumped at the point "Running your new game on App Engine".
The guide says "To run your game on Google App Engine, we can use the kindleit.net maven-gae-plugin." I have looked at http://www.kindleit.net/maven_gae_plugin/ but do not understand what I am supposed to do.

1) Can someone point me in the right direction regarding what I need to do to get/install the maven-gae-plugin. I assume this is a plugin for Maven but have no idea what to do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏九 2025-01-10 22:06:26

要在项目中使用 maven-gae-plugin,您需要将以下内容添加到 pom.xml 的存储库部分

<repository>
    <id>maven-gae-plugin-repo</id>
    <name>maven-gae-plugin repository</name>
    <url>http://maven-gae-plugin.googlecode.com/svn/repository</url>
</repository>

在 pom.xml 的 build/plugins 部分添加以下插件:

<plugin>
  <groupId>net.kindleit</groupId>
  <artifactId>maven-gae-plugin</artifactId>
  <version>0.9.2</version>
  <configuration>
    <serverid>appengine.google.com</serverId>
  </configuration>
</plugin>

确保以下内容位于您的 pom.xml 中html/src/webapp/WEB-INF/appengine-web.xml 文件

<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">

  ...

  <!-- This is the unique id of your GAE application -->
  <application>my-unique-app-name</application>
  <!--  This variable is defined in your POM file -->
  <version>${gae.application.version}</version>

  ...

</appengine-web-app>

并在 ~/.m2/settings.xml 中添加以下内容

<settings>
  ...
  <servers>
    <server>
      <id>appengine.google.com</id>
      <username>[email protected]</username>
    </server>
  </servers>
  ...
</settings>

然后从 html 文件夹运行 mvn gae:deploy在 PlayN 项目中。请注意,如果您的代码依赖于使用 GAE 的数据存储,那么仅此一项并不能解决让 DataNucleus 增强域对象的任务。那是一个完全不同的蜡球:)

To use the maven-gae-plugin in your project, you need to add the following to the repositories section of your pom.xml

<repository>
    <id>maven-gae-plugin-repo</id>
    <name>maven-gae-plugin repository</name>
    <url>http://maven-gae-plugin.googlecode.com/svn/repository</url>
</repository>

Add the following plugin in the build/plugins section of your pom.xml:

<plugin>
  <groupId>net.kindleit</groupId>
  <artifactId>maven-gae-plugin</artifactId>
  <version>0.9.2</version>
  <configuration>
    <serverid>appengine.google.com</serverId>
  </configuration>
</plugin>

Make sure the following is in your html/src/webapp/WEB-INF/appengine-web.xml file

<?xml version="1.0" encoding="UTF-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">

  ...

  <!-- This is the unique id of your GAE application -->
  <application>my-unique-app-name</application>
  <!--  This variable is defined in your POM file -->
  <version>${gae.application.version}</version>

  ...

</appengine-web-app>

And add the following in your ~/.m2/settings.xml

<settings>
  ...
  <servers>
    <server>
      <id>appengine.google.com</id>
      <username>[email protected]</username>
    </server>
  </servers>
  ...
</settings>

Then run mvn gae:deploy from your html folder in the PlayN project. Do note that this alone doesn't take care of the task of having DataNucleus enhance your domain objects if you have code that relys on using GAE's Datastore. That's an entirely different ball of wax there :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文