2013-01-15 35 views
1

我能够在昨天运行该示例,但尝试让playn与Eclipse一起工作后,它不再有效。它以HTML5的形式正常运行(mvn -Phtml集成测试)。PlayN showcase(java)不运行 - 没有错误或警告

这里是我下载并运行playn样本/展示完整的输出:

$ 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] ------------------------------------------------------------------------ 

回答

1

使用-P开关指定平台。在你的情况(JAVA)说:

mvn test -Pjava

如果你想尝试HTML口,说:

mvn -Phtml integration-test

0

的playn网站是愚蠢的。

mvn test只是运行测试套件。相反,你应该运行mvn install,你会看到类似这样的:

... 
[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> 
... 

然后,您可以找到您的手机上的应用程序,它被称为“橱窗”,有一个圆形的绿色笑脸图片。

您也可以从命令行启动应用程序,只需cd androidmvn android:run。请注意,只有运行了之前安装的应用程序,它不会安装它。

+0

我试图在本地运行的Java版本。所有提到运行Java版本的人都会说使用'mvn test'。有趣的是,他们也说你必须使用'mvn -Pandroid install'来运行Android版本。 (对不起,我不能满足你的答案,我还没有足够的代表) – Sunlis

+1

我还发现''mvn test'只是运行测试 - 我使用'mvn -Pjava integration-test'来运行Java版本。 – jazzbassrob

+1

啊哈!能够将其标记为答案! – Sunlis

相关问题