无法在Eclipse中创建骨架PlayN项目 [英] Unable to create skeleton PlayN project in Eclipse
问题描述
'创建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,所以这不是问题。
这是一个我想出的解决方案:
- 从 Apache 下载apache-maven-3.0.x
- (在Windows上)将apache-maven-3.0.x中的bin文件夹的位置添加到PATH环境变量(单击编辑,添加分号和bin文件夹的路径到最后)
- 使用Maven(而不是Eclipse)生成一个新项目:
mvn archetype:generate -DarchetypeGroupId = com。 googlecode.playn -DarchetypeArtifactId = playn-archetype -DarchetypeVersion = 1.3.1
- (在Eclipse中)File-> Import- >现有Maven项目;浏览到您生成项目的位置(可能是您的用户文件夹)并导入。
- 要运行该项目,请在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:
- Download apache-maven-3.0.x from Apache
- (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)
- Generate a new project with Maven (not Eclipse):
mvn archetype:generate -DarchetypeGroupId=com.googlecode.playn -DarchetypeArtifactId=playn-archetype -DarchetypeVersion=1.3.1
- (In Eclipse) File->Import->Existing Maven Project; browse to where you generated the project (probably your user folder) and import.
- To run the project, run as "Maven test" on gameName, edit gameName-core
Cheers!
这篇关于无法在Eclipse中创建骨架PlayN项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!