期待已久的超级开发模式来了,我尝试使用它。构建 GWT 主干后,我创建了一个测试应用程序并成功编译它。然后,我将其添加到模块 XML 文件中,以启用 Chrome 的 Source Maps:
<!-- Allows debugging without DevMode -->
<set-property name="compiler.useSourceMaps" value="true">
<when-property-is name="user.agent" value="safari" />
</set-property>
然后我尝试编译应用程序。输出如下:
Compiling module com.hsi.gwt.test.sdm.Hello_sdm
Compiling 6 permutations
Compiling permutation 0...
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compiling permutation 5...
Source Maps Enabled
Compile of permutations succeeded
Linking into /Users/bbrudnoy/Workspaces/indigo-hsi/hello-sdm/war/hello_sdm
Invoking Linker Export CompilationResult symbol maps
[ERROR] Failed to link
java.lang.NoClassDefFoundError: org/json/JSONException
at com.google.gwt.thirdparty.debugging.sourcemap.SourceMapGeneratorV3.mergeMapSection(SourceMapGeneratorV3.java:243)
at com.google.gwt.core.linker.SymbolMapsLinker.link(SymbolMapsLinker.java:299)
at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLinkForOnePermutation(StandardLinkerContext.java:372)
at com.google.gwt.dev.Link.finishPermutation(Link.java:491)
at com.google.gwt.dev.Link.doSimulatedShardingLink(Link.java:453)
at com.google.gwt.dev.Link.link(Link.java:200)
at com.google.gwt.dev.Compiler.run(Compiler.java:262)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
Caused by: java.lang.ClassNotFoundException: org.json.JSONException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 12 more
我错过了什么?