Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to create skeleton PlayN project in Eclipse

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,

like image 526
Michael Tang Avatar asked Jul 06 '12 06:07

Michael Tang


1 Answers

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!
like image 199
Michael Tang Avatar answered Oct 23 '22 02:10

Michael Tang