无法使用maven和Intellij IDEA打包GWT项目。请帮我解决这个问题。我有多模块结构。我试图清理所有目标。
My Maven gwt-compiler-plugin配置:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.5.0</version> <executions> <execution> <goals> <goal>compile</goal> <goal>generateAsync</goal> </goals> </execution> </executions> <configuration> <copyWebapp>true</copyWebapp> <style>OBFUSCATED</style> <module>com.example.Gui</module> <force>true</force> <extraJvmArgs>-Xmx1024M -Xss2048k</extraJvmArgs> </configuration> </plugin>
错误追踪:
[INFO] --- gwt-maven-plugin:2.5.0:compile (default) @ gui-localon --- [WARNING] Don't declare gwt-dev as a project dependency. This may introduce complex dependency conflicts [INFO] Compiling module net.piqc.gui.gwt.localon.GuiLocalon [INFO] [ERROR] An internal compiler exception occurred [INFO] com.google.gwt.dev.jjs.InternalCompilerException: Error constructing Java AST [INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.translateException(GwtAstBuilder.java:2989) [INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.visit(GwtAstBuilder.java:1649) [INFO] at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.traverse(LocalDeclaration.java:237) [INFO] at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:239) [INFO] at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1239) [INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder.process(GwtAstBuilder.java:2948) [INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater$UnitProcessorImpl.process(CompilationStateBuilder.java:124) [INFO] at com.google.gwt.dev.javac.JdtCompiler$CompilerImpl.process(JdtCompiler.java:247) [INFO] at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444) [INFO] at com.google.gwt.dev.javac.JdtCompiler.doCompile(JdtCompiler.java:718) [INFO] at com.google.gwt.dev.javac.CompilationStateBuilder$CompileMoreLater.compile(CompilationStateBuilder.java:248) [INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.doBuildFrom(CompilationStateBuilder.java:463) [INFO] at com.google.gwt.dev.javac.CompilationStateBuilder.buildFrom(CompilationStateBuilder.java:388) [INFO] at com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:373) [INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:246) [INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:229) [INFO] at com.google.gwt.dev.Precompile.precompile(Precompile.java:141) [INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:232) [INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:198) [INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:170) [INFO] at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88) [INFO] at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82) [INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:177) [INFO] Caused by: java.lang.NoSuchMethodError: com.google.gwt.dev.jjs.ast.JProgram.createLocal(Lcom/google/gwt/dev/jjs/SourceInfo;Ljava/lang/String;Lcom/google/gwt/dev/jjs/ast/JType;ZLcom/google/gwt/dev/jjs/ast/JMethodBody;)Lcom/google/gwt/dev/jjs/ast/JLocal; [INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.createLocal(GwtAstBuilder.java:2079) [INFO] at com.google.gwt.dev.jjs.impl.GwtAstBuilder$AstVisitor.visit(GwtAstBuilder.java:1646) [INFO] ... 21 more [INFO] [ERROR] at AbstractDataTable.java(124): JsArrayNumber timevalue = getValueTimevalue(rowIndex, columnIndex); [INFO] org.eclipse.jdt.internal.compiler.ast.LocalDeclaration