我想在 Ubuntu 12.04 的 Springsource Tool Suite 2.9.1 中使用 Spring ROO 1.2.1 + GWT 2.6.1。按照http://www.bytespring.com/blog/spring-roo-integration-gwt中的视频指南,我可以使用 roo 通过“expense”脚本创建一个新项目,然后使用 mvn gwt:run 运行它。好的,比我想在 STS 中管理它,现在问题开始了。这似乎是关于 m2e 的问题。
在 pom.xml 中,ID 为“exec-maven-plugin”的工件的标签有这个错误:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:exec-maven-plugin:1.2:exec (execution: default, phase: process-classes)
我尝试按照如何解决 Spring Data Maven Builds 的“生命周期配置未涵盖的插件执行”中建议的解决方案。
用“pluginManagement”标签包围“plugins”标签。现在错误不再出现。
然后我运行应用程序,“运行方式 -> Web 应用程序”... HTML 页面选择:ApplicationScaffold.html。
出现该网页,但有一个带有此错误的窗口:
Error: One or more exceptions caught, see full set in UmbrellaException#getCause".
STS 控制台说
"java.lang.RuntimeException: The RequestFactory ValidationTool must be run for the org.springsource.roo.extrack.client.managed.request.ApplicationRequestFactory RequestFactory type".
为了解决这个问题,我按照http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation中的说明进行操作。
1)在Project Properties->Java Compiler->Annotation Properties我启用了项目特定的设置,注释处理和编辑器中的处理,gen.source目录:.apt_generated;冗长的错误。
2) 在 Factory Path 中,启用项目特定设置,并添加位于的外部 requestfactory-apt.jar
/home/toni/springsource/sts-2.9.1.RELEASE/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201205091048-rel-r37/gwt-2.4.0
(对??)
(我不明白“验证工具”和“Maven 构建”部分对我来说是否重要)
现在我尝试重新运行(在重建项目之后)并且同样的错误仍然存在。
有人解决了这个问题??如何?请逐步解释,因为我不是专家,这是我第一次使用 spring 和 gwt 的方法......