Question

I was able to run the sample yesterday, but after attempting to get playn to work with Eclipse it no longer works. It runs normally as HTML5 (mvn -Phtml integration-test).

Here's the full output of me downloading and running playn-samples/showcase:

$ ls -la
total 0
drwxr-xr-x   2 sean  staff   68 14 Jan 21:46 .
drwxr-xr-x  16 sean  staff  544 14 Jan 21:46 ..
$ git clone https://code.google.com/p/playn-samples
Cloning into 'playn-samples'...
remote: Counting objects: 4291, done.
remote: Finding sources: 100% (4291/4291), done.
remote: Total 4291 (delta 1766)
Receiving objects: 100% (4291/4291), 58.48 MiB | 4.26 MiB/s, done.
Resolving deltas: 100% (1766/1766), done.
$ cd playn-samples/showcase
$ mvn test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] PlayN Showcase Metaproject
[INFO] PlayN Showcase Core
[INFO] PlayN Showcase Android
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Showcase Metaproject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ playn-showcase ---
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Showcase Core 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ playn-showcase-core ---
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ playn-showcase-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 53 resources
[INFO] skip non existing resourceDirectory /Users/sean/dev/playn/playn-samples/showcase/core/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3:compile (default-compile) @ playn-showcase-core ---
[INFO] Compiling 28 source files to /Users/sean/dev/playn/playn-samples/showcase/core/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ playn-showcase-core ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/sean/dev/playn/playn-samples/showcase/core/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3:testCompile (default-testCompile) @ playn-showcase-core ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ playn-showcase-core ---
[INFO] No tests to run.
[INFO] Surefire report directory: /Users/sean/dev/playn/playn-samples/showcase/core/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no tests to run.

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Showcase Android 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ playn-showcase-android ---
[INFO] 
[INFO] --- android-maven-plugin:3.1.1:generate-sources (default-generate-sources) @ playn-showcase-android ---
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] ANDROID-904-002: Found aidl files: Count = 0
[INFO] /Developer-3.2.5/androidsdk/platform-tools/aapt [package, -m, -J, /Users/sean/dev/playn/playn-samples/showcase/android/target/generated-sources/r, -M, /Users/sean/dev/playn/playn-samples/showcase/android/AndroidManifest.xml, -S, /Users/sean/dev/playn/playn-samples/showcase/android/res, --auto-add-overlay, -I, /Developer-3.2.5/androidsdk/platforms/android-11/android.jar]
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ playn-showcase-android ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/sean/dev/playn/playn-samples/showcase/android/src/main/resources
[INFO] skip non existing resourceDirectory /Users/sean/dev/playn/playn-samples/showcase/android/target/generated-sources/extracted-dependencies/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3:compile (default-compile) @ playn-showcase-android ---
[INFO] Compiling 2 source files to /Users/sean/dev/playn/playn-samples/showcase/android/target/classes
[INFO] 
[INFO] --- android-maven-plugin:3.1.1:proguard (default-proguard) @ playn-showcase-android ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ playn-showcase-android ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/sean/dev/playn/playn-samples/showcase/android/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3:testCompile (default-testCompile) @ playn-showcase-android ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.13:test (default-test) @ playn-showcase-android ---
[INFO] No tests to run.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] PlayN Showcase Metaproject ........................ SUCCESS [0.289s]
[INFO] PlayN Showcase Core ............................... SUCCESS [1.784s]
[INFO] PlayN Showcase Android ............................ SUCCESS [1.125s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.034s
[INFO] Finished at: Mon Jan 14 21:48:18 EST 2013
[INFO] Final Memory: 15M/81M
[INFO] ------------------------------------------------------------------------
Was it helpful?

Solution

Specify platform too with the -P switch. In your case (Java) say:

mvn test -Pjava

If you want to try the HTML port, say:

mvn -Phtml integration-test

OTHER TIPS

The playn site is stupid.

mvn test just runs the test suite. Instead, you should run mvn install, you will see something like:

...
[INFO] Waiting for initial device list from the Android Debug Bridge
[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
[INFO] Successfully uninstalled playn.showcase.android from <DEVICENAME>
[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
[INFO] Successfully installed /home/wires/workdir/wordquiz-playn/playn-samples/showcase/android/target/playn-showcase-android-1.0-SNAPSHOT.apk to <DEVICENAME>
...

You can then find the application on your phone, it is called "Showcase" and has a round green smiley icon.

You can also start the application from the commandline, just cd android and mvn android:run. Note that this only runs the application you installed before, it doesn't install it.

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