_*It's awesome!* Just a day before I was thinking what technologies to use
to build my facebook + flash game portal + android game. I have the answer
now and it's better than I could even imagine! *Thank you a lot for the
kick-ass game technology!*
For more information:
http://code.google.com/p/playn/wiki/GettingStarted
Great work!
There was one build failure though when compiling the PlayN Showcase Flash
project.
Apparently, the gwt-maven-plugin runs out of heap memory (most easily seen
by copying the generated command-line and running it "by hand").
My recommended solution is to change playn/sample/showcase/flash/pom.xml as
follows:
Prepend ${env.JAVA_OPTS} to the current extraJvmArgs value in the
gwt-maven-plugin configuration (line 100). (Or possibly use a static value
to avoid the environment dependence)
Environment used:
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Java version: 1.6.0_13, vendor: Sun Microsystems Inc.
Default locale: sv_SE, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
Also, in Eclipse I get this error for every web-based project:
WAR source directory /playn-cute-html/src/main/webapp is missing
playn-cute-html Unknown Google Web App Problem
On closer inspection, Google Web Application settings for the project use
src/main/webapp as WAR directory, not war (as should be the case given your
current directory layout).
My guess is that the Google Eclipse plugin does not catch the non-standard
setting of the war directory location in the pom.xml for the project:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webXml>war/WEB-INF/web.xml</webXml>
<warSourceDirectory>war</warSourceDirectory>
</configuration>
</plugin>
but instead, erroneously, uses the conventional location which does not
exist.
Am I missing something or is this correctly observed? If the latter, could
you please fix this? In general, using a directory layout as per Maven's
conventions would be the most desirable solution, but I guess there are
internal reasons for not doing so.
Oh, and I added the webXml element in the maven-war-plugin configuration.
Including/excluding it has no effect on the error. *Just to avoid confusion*
I got an error while building playn, using 'ant install' in the playn
directory:
{{{
/home/david/src/playn/build.xml:35: The following error occurred while
executing this line:
/home/david/src/playn/etc/build-common.xml:66: Test playn.tests.AssertsTest
failed
}}}
I just pulled from the git repository, so it's the most recent version
available.
David: The playn tests expect assertions to be enabled in your JVM, which I
think most people have accomplished by adding -ea to their ANT_OPTS. Rather
than adding that to the docs, I just pushed a change to the ant build that
turns on assertions for junit. If you pull again, this should be fixed.
I don't have much experience with ant, but pulling the latest build fixed
it. I managed to build and run the samples. However, from what I read in
the Guide, it seems that using Maven is recommended, so I will stop using
ant.
Thank you very much! Time to start exploring playn now.
How can I run the HTML5 from Eclipse? I have the project set up (using
Maven), but I'm not sure how to actually make it work. Could you update the
wiki with instructions on how to do this?
Thanks.
Failed to execute goal
com.jayway.maven.plugins.android.generation2:maven-android-plugin:3.0.0-alpha-2:apk
(default-apk) on project playn-showcase-android: Could not copy native
dependency.
Source '/home/david/src/playn/sample/showcase/android/target/libs' and
destination '/home/david/src/playn/sample/showcase/android/target/libs' are
the same
I can actually build playn with Maven once, but the second time it never
works because of the above error.
its showing artifact missing tools:1.6 error and an error in first line in
pom.xml file please clear this issue its happening in eclipse only
Hi all,
i am getting artifact missing:tools:1.6, and error in all the pom
files this is happening in eclipse only please provide me a solution.... . .
@mrudhaya..
your eclipse installation must be pointing to standalone jre instead of jdk.
change it to jdk by Window>Preferences>Java>Installed JRE's
Click Add and point it to jdk installation folder. It is under
programFiles\Java if in windows.
That should fix your problem
@m.bharat. I have the same problem, and specifying the JDK does not fix the
problem.
@eurigjo & @m.bharat aye specifying the jdk in eclipse doesn't work (well
it didn't for me). In the eclipse.ini file (in your eclipse folder) add
the lines:
-vm
C:/Program Files/Java/jdk1.6.0_16/bin/javaw.exe
{putting in your own path for the jdk}
How do I overcome this error when I try to do a maven-install of playn-cute
(I get the same thing when I do it on playn-project)?
[INFO]
------------------------------------------------------------------------
[INFO] Building PlayN Cute Flash 1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:unpack (unpack) @ playn-cute-flash
---
[INFO] Configured Artifact: com.adobe.flex:flex-sdk:4.1.0.16076_mpl:zip
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.
Downloading:
http://forplay.googlecode.com/svn/mavenrepo/com/adobe/flex/flex-sdk/4.1.0.16076_mpl/flex-sdk-4.1.0.16076_mpl.zip
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] PlayN Cute Metaproject ............................ SUCCESS [0.625s]
[INFO] PlayN Cute Core ................................... SUCCESS [5.781s]
[INFO] PlayN Cute HTML ................................... SUCCESS [54.125s]
[INFO] PlayN Cute Flash .................................. FAILURE
[23:58.047s]
[INFO] PlayN Cute Android ................................ SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 25:01.422s
[INFO] Finished at: Mon Oct 24 17:20:07 BST 2011
[INFO] Final Memory: 9M/17M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack (unpack) on
project playn-cute-flash: Unable to resolve artifact. Could not transfer
artifact com.adobe.flex:flex-sdk:zip:4.1.0.16076_mpl from/to forplay-legacy
(http://forplay.googlecode.com/svn/mavenrepo): No response received after
60000
[ERROR] com.adobe.flex:flex-sdk:zip:4.1.0.16076_mpl
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] forplay-legacy (http://forplay.googlecode.com/svn/mavenrepo,
releases=true, snapshots=true),
[ERROR] central (http://repo1.maven.org/maven2, releases=true,
snapshots=false)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR] mvn <goals> -rf :playn-cute-flash
Please post trouble shooting questions to
http://stackoverflow.com/questions/tagged/playn
Just in case anyone else had problems getting the mvn archetype working,
here is what worked for me. Install playn by checking out the source, and
running either ant or mvn as instructed. Then
`>mvn -DarchetypeGroupId=com.googlecode.playn
-DarchetypeArtifactId=playn-archetype -DarchetypeVersion=1.0-SNAPSHOT
org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate`
In the section on setting up Eclipse, you should change the order of the
Android and Google plugins. The Google plugins (if you install all packages
at least) depends on the ADT being installed first.
I was looking around to get a version of creating the skeleton project via
Ant, but couldn't find any.
Hence I created my own port from the given mavern skeleton project creation.
http://ez-playn.googlecode.com/files/playn-ant-project-creation.zip
The "Generating a skeleton project with Eclipse" section says nothing about
adding/selecting an archetype... as someone new to Maven, I'm confused. I
selected "nexus" configuration. Selected the latest version of playn I
could see 1.0.3 and clicked next.
I have no idea if this is/isn't correct and whether it will bite me in the
ass later.
I think I followed all the instructions for installing it with Eclipse, but
I don't have "playn.*" namespace available. I just write import playn. and
it says "this compilation unit is not in the build path...". What should I
do?
+1 @ "Note: Instructions for testing the Android backend from Eclipse are
forthcoming."
I can't even get the thing to deploy by command line to my nexus s
+1 @ "Note: Instructions for testing the Android backend from Eclipse are
forthcoming." - I'm desperately waiting for this!
I can't get it to deploy with maven either... it compiles but can't deploy
it
HTTP ERROR: 404
RequestURI=/HelloGame.html
no one game is working through "web application" . whats wrong ??
This install procedure is a car wreck. A messy one. There is no way people
will use PlayN with this level of complexity just to install it.
I'm fairly experienced with Eclipse and I can't get it to work. I get stuff
like this:
Could not calculate build plan: Error resolving version for
plugin 'org.apache.maven.plugins:maven-resources-plugin' from the
repositories [local (C:\Users\XYZ\.m2\repository), codehaus.snapshots
(http://snapshots.repository.codehaus.org/), central
(http://repo1.maven.org/maven2)]: Plugin not found in any plugin repository
..and a ton more stuff. Not good, and no amount of Googling has helped, so
I am stuck. Can anyone help?
Please try Stack Overflow http://stackoverflow.com/questions/tagged/playn
I'm following the instructions from _Generating a skeleton project with
Eclipse_ and onwards to _Running your new game on App Engine_. It works
well until the point of running `mvn gae:unpack`. Then I get the following
error message:
Could not find goal 'unpack' in plugin
org.codehaus.mojo:google-app-engine-maven-plugin:1.0-SNAPSHOT among
available goals requestLogs, run, update, updateIndexes, setup, check,
help, rollback, enhance
Any ideas how to fix that?
@joh I ran into the same issue. I had to modify the following plugin
entry as follows:
{{{
<build>
...
<plugin>
<groupId>net.kindleit</groupId>
<artifactId>maven-gae-plugin</artifactId>
<version>0.9.2</version>
<executions>
<execution>
<id />
<phase>validate</phase>
<goals>
<goal>unpack</goal>
</goals>
</execution>
</executions>
<dependencies>
<!--
Declare explicit dependency on gae-runtime here,
so we can specify the App Engine SDK version
-->
<dependency>
<groupId>net.kindleit</groupId>
<artifactId>gae-runtime</artifactId>
<version>${gae.version}</version>
<type>pom</type>
</dependency>
</dependencies>
</plugin>
...
</build>
}}}
And then I had to add some info to make m2e happy, as follows:
{{{
<build>
...
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e
settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>net.kindleit</groupId>
<artifactId>maven-gae-plugin</artifactId>
<versionRange>[0.9.2,)</versionRange>
<goals>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
}}}
After that, gae:unpack ran just fine...
Thanks, random person on the internet! :) That certainly helps. Running
`mvn gae:run` doesn't work still, not sure why yet. This certainly is an
uphill battle. Thanks for the help, though.
Quick question -- did you add the changes above to the top level pom.xml or
to html/pom.xml?
@joh If you can submit a question with a detailed description of the
problem (i.e. maven output, etc.) at
http://stackoverflow.com/questions/tagged/playn, it's highly likely that
someone will be able to help you :)
Im the new kid... Where can I find API Documentation? Tutorials, etc...
Thank You
TL;DR isn't working for me:
The POM for com.threerings:tripleplay:jar:1.1-SNAPSHOT is missing, no
dependency information available
Failed to execute goal on project playn-showcase-core: Could not resolve
dependencies for project
com.googlecode.playn:playn-showcase-core:jar:1.0-SNAPSHOT: Could not find
artifact com.threerings:tripleplay:jar:1.1-SNAPSHOT in forplay-legacy
(http://forplay.googlecode.com/svn/mavenrepo)
I have a similar error when I run:
mvn clean package
mvn -f android/pom.xml android:deploy
[ERROR] Failed to execute goal on project playn-showcase-android: Could not
reso
lve dependencies for project
com.googlecode.playn:playn-showcase-android:apk:1.0
-SNAPSHOT: Failure to find
com.googlecode.playn:playn-showcase-core:jar:1.0-SNAP
SHOT in http://forplay.googlecode.com/svn/mavenrepo was cached in the local
repo
sitory, resolution will not be reattempted until the update interval of
forplay-
legacy has elapsed or updates are forced -> [Help 1]
Hrm. Unfortunately it seems that you have to do "mvn clean install" at
least once, then you can just use "mvn clean package" after that.
I get the same problem as Yoav.Zibin,I get playn-showcase-html is not a
GWT project
Any idea?
I saw that there is IOS support, anyone here managed to compile it to IOS.
I have manged to create a game and it is in the market
(https://market.android.com/details?id=com.idrosh.games.android.free&feature),
but i couldn't see how I can also support the IOS.
Thanks, Avi Yafe
getting following error for playn-showcase project build
==================================================================================================
Failed to execute goal on project playn-showcase-java: Could not resolve
dependencies for project
com.googlecode.playn:playn-showcase-java:jar:1.0-SNAPSHOT: Failure to find
jlayer:mp3spi:jar:1.9.5 in
https://ec2-ncisfb-build01.sng.ubi.com/nexus/content/groups/public was
cached in the local repository, resolution will not be reattempted until
the update interval of Nexus has elapsed or updates are forced -> [Help 1]
====================================================================================================
Also when I compile and Run playn-showcase-html project, and browse it, on
clicking any demo link, getting errors:
====================================================================================================
(UnknownFileName:-1) 2012-02-29 14:37:44,252 [FATAL] Uncaught JavaScript
exception [uncaught exception: java.lang.IllegalArgumentException] in ,
line 0
==============================================================================================
Please help.
Thanks
Instructions for running HTML5 app from Eclipse appear to be incomplete. Do
I need to set up a server for that?
http://stackoverflow.com/questions/8275867/playn-html5-wont-run-from-eclipse
Instructions for running HTML app from Eclipse appear to be incomplete. Do
Whenever I type a .(dot) or try auto completion, Eclipse gives me an error.
"The compilation Unit is not on the build path of a Java Project"
I saw somewhere about a suggested VM image for the build system, something
like that would make it very easy for beginners like me to get started.
Thank you!
Yasith
Awesome, followed instructions and even got the sample showcase project to
publish to appengine.
AppEngine setup for me on Eclipse Indigo
http://code.google.com/p/google-web-toolkit/wiki/WorkingWithMaven#Eclipse_Indigo_Java_IDE_(_not_Java_EE)
For everyone getting the error "Could not resolve dependencies for project
com.googlecode.playn:playn-showcase-java" in Eclipse, you can run the
project successfully by choosing to run it as a "Java Application", and
choose the class "ShowcaseJava".
I'm starting to think that making separate native versions of a game will
actually be easier and less time-consuming than trying to get this to work.
The Eclipse section could really benefit from an additional step :
Installing EGIT, pulling the PlayN source and selecting the pom.xml type to
install the archetype...
I was able to deploy sample apps to android device:
mvn eclipse:eclipse
followed by:
cd playn-samples/showcase
mvn clean install -pl core,android
mvn -f android/pom.xml android:deploy
This way I don't get the following problem anymore:
getting following error for playn-showcase project build
Failed to execute goal on project playn-showcase-java: Could not resolve
dependencies for project
com.googlecode.playn:playn-showcase-java:jar:1.0-SNAPSHOT: Failure to find
jlayer:mp3spi:jar:1.9.5 in
https://ec2-ncisfb-build01.sng.ubi.com/nexus/content/groups/public was
cached in the local repository, resolution will not be reattempted until
the update interval of Nexus has elapsed or updates are forced -> 1?
Also when I compile and Run playn-showcase-html project, and browse it, on
clicking any demo link, getting errors:
(UnknownFileName?:-1) 2012-02-29 14:37:44,252 FATAL? Uncaught JavaScript?
exception exception: java.lang.IllegalArgumentException? in , line 0