Unable to create skeleton PlayN project in Eclipse
Asked Answered
M

2

5

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,

Misuse answered 6/7, 2012 at 6:50 Comment(0)
M
9

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!
Misuse answered 6/7, 2012 at 17:27 Comment(2)
This workaround seems to be working. But I wonder how can we really solve this issue to allow people creating projects from eclipse.Jackstay
This workaround has worked for me on OSX with Eclipse Juno. I only needed to follow steps 1 and 2, change Eclipse version of Maven to the 'external' version downloaded from Apache. Then I resolved all the errors (for Java projects) with Quick FixBugs
F
0

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.

Fraze answered 6/7, 2012 at 10:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.