2012-11-04 32 views
1

Android和Java版本工作正常,但是當我嘗試comile HTML版本時,我只得到錯誤。 我是通過選擇maven build ...並在目標文本字段中輸入集成測試來完成的(比如入門指南中的建議)。 但我只得到以下錯誤:PlayN無法編譯HTML

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. 
[INFO] Scanning for projects... 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building PlayN Hello HTML 1.0-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven) @ playn-hello-html --- 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ playn-hello-html --- 
[debug] execute contextualize 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory F:\Documents\Programmieren\PlayN\game\html\src\main\resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.3:compile (default-compile) @ playn-hello-html --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ playn-hello-html --- 
[debug] execute contextualize 
[INFO] Using 'UTF-8' encoding to copy filtered resources. 
[INFO] skip non existing resourceDirectory F:\Documents\Programmieren\PlayN\game\html\src\test\resources 
[INFO] 
[INFO] --- maven-compiler-plugin:2.3:testCompile (default-testCompile) @ playn-hello-html --- 
[INFO] No sources to compile 
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ playn-hello-html --- 
[INFO] Surefire report directory: F:\Documents\Programmieren\PlayN\game\html\target\surefire-reports 
------------------------------------------------------- 
T E S T S 
------------------------------------------------------- 

Results : 

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

[INFO] 
[INFO] --- gwt-maven-plugin:2.4.0:compile (default) @ playn-hello-html --- 
[ERROR] Fehler: Hauptklasse com.google.gwt.dev.Compiler konnte nicht gefunden oder geladen werden 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 2.527s 
[INFO] Finished at: Fri Nov 02 10:31:17 CET 2012 
[INFO] Final Memory: 11M/28M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.4.0:compile (default) on project playn-hello-html: Command [[ 
[ERROR] C:\Program Files (x86)\Java\jre7\bin\java -Xmx256m -classpath F:\Documents\Programmieren\PlayN\game\html\src\main\java;F:\Documents\Programmieren\PlayN\game\html\src\main\resources;F:\Documents\Programmieren\PlayN\game\html\target\classes;C:\Users\\.m2\repository\com\googlecode\playn\playn-hello-core\1.0-SNAPSHOT\playn-hello-core-1.0-SNAPSHOT.jar;C:\Users\\.m2\repository\com\googlecode\playn\playn-core\1.4\playn-core-1.4.jar;C:\Users\\.m2\repository\com\samskivert\pythagoras\1.2\pythagoras-1.2.jar;C:\Users\ 
\.m2\repository\com\googlecode\playn\playn-html\1.4\playn-html-1.4.jar;C:\Users\\.m2\repository\com\googlecode\playn\playn-webgl\1.4\playn-webgl-1.4.jar;C:\Users\\.m2\repository\com\google\gwt\gwt-user\2.4.0\gwt-user-2.4.0.jar;C:\Users\\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\Users\\.m2\repository\com\allen-sauer\gwt\voices\gwt-voices\2.1.8\gwt-voices-2.1.8.jar;C:\Users\\.m2\repository\com\google\gwt\gwt-user\2.4.0\gwt-user-2.4.0.jar;C:\Users\\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA.jar;C:\Users\\.m2\repository\javax\validation\validation-api\1.0.0.GA\validation-api-1.0.0.GA-sources.jar;C:\Users\\.m2\repository\com\google\gwt\gwt-dev\2.4.0\gwt-dev-2.4.0.jar com.google.gwt.dev.Compiler -gen F:\Documents\Programmieren\PlayN\game\html\target\.generated -logLevel INFO -style PRETTY -war F:\Documents\Programmieren\PlayN\game\html\target\playn-hello-html-1.0-SNAPSHOT -localWorkers 8 -XdisableClassMetadata -XdisableCastChecking -XdisableRunAsync playn.sample.hello.HelloGame 
[ERROR] ]] failed with status 1 
[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 

當我嘗試谷歌 - > GWT編譯(如這裏提到的地方#2),它只是說,這是不是一個GWT項目!

如何才能使HTML版本正常工作?

問候 Fleckdalm

+0

嘗試MVN清潔-Phtml包 – AndresQ

+0

這幫助!非常感謝你! – Fleckdalm

回答

2

試試這個:

mvn clean -Phtml package

+0

你確實沒有做錯任何事情,因爲這確實是答案,但是第一行對於第一次打開頁面時人們看起來仍然很粗略。 – Tyrsius