无法在Eclipse中创建骨架PlayN项目 [英] Unable to create skeleton PlayN project in Eclipse

查看:307
本文介绍了无法在Eclipse中创建骨架PlayN项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经到了几乎放弃尝试使用PlayN的地步。我试过PlayN的入门指南 here 以及GamesFromScratch的更新指南<一个href =http://www.gamefromscratch.com/post/2011/11/07/PlayN-install-guide_The-new-way.aspx =noreferrer>这里,没有运气。每次尝试使用code.googlecode.playn 1.3.1原型创建一个New-> Other - >Maven Project时,我会收到以下错误消息:


'创建playn-archetype'遇到问题



无法从原型创建项目[com.googlecode.playn:playn-archetype:1.3 .1]
定义的工件不是原型


我想知道我做错了吗?我已经看到Eclipse附带了Maven 3.0.2版(我使用的是Eclipse Juno),所以我安装了Maven 3.0.4,尽管我不知道如何升级Eclipse的版本(或者如果它有所不同)。



非常感谢您的时间,

解决方案

Eclipse Juno嵌入与Maven 3.0.4,所以这不是问题。



这是一个我想出的解决方案:




  1. Apache 下载apache-maven-3.0.x

  2. (在Windows上)将apache-maven-3.0.x中的bin文件夹的位置添加到PATH环境变量(单击编辑,添加分号和bin文件夹的路径到最后)

  3. 使用Maven(而不是Eclipse)生成一个新项目:


    mvn archetype:generate -DarchetypeGroupId = com。 googlecode.playn -DarchetypeArtifactId = playn-archetype -DarchetypeVersion = 1.3.1


  4. (在Eclipse中)File-> Import- >现有Maven项目;浏览到您生成项目的位置(可能是您的用户文件夹)并导入。

  5. 要运行该项目,请在gameName上运行Maven test,编辑gameName-core


干杯!



I'm getting to the point where I've almost given up trying to use PlayN. I've tried PlayN's Getting Started guide here, as well as GamesFromScratch's updated guide here, with no luck. Every time I try and create a New->Other->"Maven Project" with the code.googlecode.playn 1.3.1 archetype, I get this error message:

'Creating playn-archetype' has encountered a problem

Unable to create project from archetype [com.googlecode.playn:playn-archetype:1.3.1] The defined artifact is not an archetype

I wonder if I'm doing anything wrong? I've read that Eclipse ships with Maven version 3.0.2 (I'm using Eclipse Juno), so I installed Maven 3.0.4, though I don't know how to upgrade Eclipse's version (or if it makes any difference).

Many Thanks for your time,

解决方案

Eclipse Juno comes embedded with Maven 3.0.4, so that was not the problem.

Here is a solution I came up with:

  1. Download apache-maven-3.0.x from Apache
  2. (On Windows) Add the location of the bin folder in apache-maven-3.0.x to your PATH environment variable (Click on edit, add a semicolon and the path to the bin folder to the end)
  3. Generate a new project with Maven (not Eclipse):

    mvn archetype:generate -DarchetypeGroupId=com.googlecode.playn -DarchetypeArtifactId=playn-archetype -DarchetypeVersion=1.3.1

  4. (In Eclipse) File->Import->Existing Maven Project; browse to where you generated the project (probably your user folder) and import.
  5. To run the project, run as "Maven test" on gameName, edit gameName-core

Cheers!

这篇关于无法在Eclipse中创建骨架PlayN项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆