Question

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,

Was it helpful?

Solution

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!

OTHER TIPS

You have to add the Maven runtime to the Window/Preferences/Maven/Installations. After this -in case you have previous Maven Run Configurations- you might have to update those too, to use this new Maven.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top