[Apologies to hukun for toe stepping; sometimes I can't ignore my need for
expedience.]
Purpose of code changes on this branch:
Provide a Maven archetype via which people who desire to create a PlayN project
can easily create a skeleton project which contains all of the necessary
machinations for building on all four supported platforms.
The archetype is built and installed as a part of the PlayN project, which is
how Maven intends for things to be done. Having a binary copy of the build
results of our PlayN archetype in sample/m2 is not the right way to do it. I
would have pointed that out earlier, except that I didn't know that until I did
some research into Maven archetype creation so that I could create this
archetype.
Since the archetype is built and installed as a standard PlayN artifact, when
we eventually ship a release to Maven Central, our archetype will automatically
get shipped along with the release and be available to everyone in the world to
use. Yay!
This archetype creates all four subproject types: core/java, html, flash and
android. It asks the creator for a gameName (e.g. Foozle) which is used for
class and file names everywhere (e.g. Foozle.html, Foozle.gwt.html, FoozleJava,
FoozleFlash, etc.).
I took the liberty of following standard Maven project guidelines instead of
using PlayN's idiosyncratic structure. This means source code goes in
src/main/java/${package} instead of src/${package}, and the webapp stuff goes
in src/main/webapp instead of war. That latter one was a GWT-ism that can now
be worked around.
I will create a wiki page explaining how to use this archetype from the command
line and from Maven, and giving guidance on the questions it asks prior project
setup.
When reviewing my code changes, please focus on:
https://github.com/threerings/playn/commit/6e85b834d1b9ff91b1d4dbc22c1c39929ed3d
38f
Quick instructions for testing this archetype:
% cd playn
[if you haven't already]
% git remote add samskivert git://github.com/threerings/playn.git
[/if you haven't already]
% git fetch samskivert
% git checkout -b samskivert-archetype
% git cherry-pick 6e85b834d1b9ff91b1d4dbc22c1c39929ed3d38f
% cd archetype
% mvn install
% cd /tmp [or somewhere you can create a scratch project]
% mvn archetype:generate
[blah blah blah]
440: local -> playn-archetype (Archetype for PlayN game projects.)
Choose a number: XXX: [enter 440 or whatever your playn-archetype is]
[fill in the blanks as requested, remember gameName should be ClassNameFormat,
for example]
Define value for property 'groupId': : com.samskivert
Define value for property 'artifactId': : monkeys
Define value for property 'version': 1.0-SNAPSHOT: :
Define value for property 'package': com.samskivert: : com.samskivert.monkeys
Define value for property 'gameName': : Monkeys
Then import the resulting project into Eclipse or test it from the command
line, as you prefer.
After the review, I'll merge this branch into:
/trunk
Original issue reported on code.google.com by samskiv...@gmail.com on 25 Aug 2011 at 10:49
Original issue reported on code.google.com by
samskiv...@gmail.com
on 25 Aug 2011 at 10:49