gwt maven 插件 - 无法在 Eclipse 中运行原型生成的示例项目
我正在尝试使用 maven 和 codehause gwt-mave-plugin (v. 1.1) 在 Eclipse (3.4 Ganymede) 中设置一个新的 gwt 项目。
我已经安装了 Google Eclipse 插件,包括 Google App Engine Java SDK 1.2.2、Google Plugin for Eclipse 3.4 和 Google Web Toolkit SDK 1.7.0。
我正在使用 gwt-maven-plugin 原型生成指定的示例项目 此处。
我已经成功生成了项目文件并将它们作为maven项目导入到eclipse中。 然后,我使用 mvn: gwt:eclipse 生成了一个启动脚本,如下所示:mojo.codehaus.org/gwt-maven-plugin/user-guide/hosted.html。
生成的启动脚本被 Google Eclipse 插件识别,该插件在右键单击并选择运行时尝试将其作为 gwt 应用程序启动。 但是,该应用程序无法启动,并出现以下错误:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/appengine/tools/development/DevAppServerMain
有人知道我在这里缺少什么吗? 任何帮助或其他信息资源的链接将不胜感激!
谢谢, 乔金
I'm trying to setup a new gwt project in Eclipse (3.4 Ganymede) using maven with the codehause gwt-mave-plugin (v. 1.1).
I have installed the Google Eclipse Plugin including the Google App Engine Java SDK 1.2.2, the Google Plugin for Eclipse 3.4 and the Google Web Toolkit SDK 1.7.0.
I'm using the gwt-maven-plugin archetype to generate a sample project as specified here.
I have successfully generated the project files and imported them as a maven project into eclipse. I have then generated a launch script using mvn: gwt:eclipse as specified here: mojo.codehaus.org/gwt-maven-plugin/user-guide/hosted.html.
The genereated launch script gets recognized by the Google Eclipse Plugin which tries to launch it as a gwt app when right-clicking and choosing run. However, the app fails to start with the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/appengine/tools/development/DevAppServerMain
Does anyone know what I'm missing here? Any help or links to other resources of information would be greatly appreciated!
Thanks,
Joakim
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
解决方案简单得令人尴尬。 我忘记将 Eclipse 项目标记为 GWT 项目(通过右键单击该项目,选择 Google -> Web Toolkit Settings 并选中一个框来完成)。 这导致所需的类按预期出现在类路径中。
The solution was embarrassingly simple. I had forgotten to mark the eclipse project as a GWT project (done by right-clicking on the project, choosing Google -> Web Toolkit Settings and checking a box). This caused the required classes to appear in the classpath as expected.
appengine 包似乎不在您的类路径中。 我个人从未使用过 GWT,但快速谷歌发现了这个:
那是来自谷歌网站的。 也许你需要从他们的 pom 继承。 我假设这就是原型应该做的事情。 您可能需要查看 这个。
It appears the appengine package is not in your classpath. I personally have never used GWT but a quick google turned up this:
That was from googles site. You need to inherit from their pom perhaps. I am assuming that is what the archetype should have been doing. You may want to take a look at this.
您需要添加对 Google Maven 存储库的引用,以便可以下载依赖项和父 POM。
You will need to add references to the Google Maven repository so the dependencies and parent POM can be downloaded.