1

Android 和 Java 版本运行良好,但是当我尝试编译 HTML 版本时,我只得到错误。我通过选择 maven build... 并在目标文本字段中输入 integration-test 来做到这一点(如入门指南中的建议)。但我只得到以下错误:

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

当我尝试 Google -> GWT Compile(如 Stackoverflow 上的某处所述)时,它只说这不是 GWT 项目!

我该怎么做才能使 HTML 版本正常工作?

问候弗莱克达尔姆

4

1 回答 1

2

试试这个:

mvn clean -Phtml package

于 2012-11-29T01:10:18.050 回答