gwt maven插件 - 无法在eclipse中运行原型生成的示例项目 [英] gwt maven plugin - unable to run archetype generated sample project in eclipse

查看:176
本文介绍了gwt maven插件 - 无法在eclipse中运行原型生成的示例项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Eclipse(3.4 Ganymede)中使用maven与codehause gwt-mave-plugin(v。1.1)设置一个新的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应用程序启动,从而使生成的启动脚本得到认可。但是,应用程序未能以下列错误开始:

 线程main中的异常java.lang.NoClassDefFoundError:com / google / appengine / tools / development / DevAppServerMain 

有人知道我在这里错过了什么吗?任何帮助或链接到其他资源的信息将不胜感激!



谢谢,
Joakim

解决方案

该解决方案令人尴尬地简单。我忘记将eclipse项目标记为GWT项目(通过右键单击项目,选择Google - > Web Toolkit Settings并选中一个框来完成)。这导致所需的类按预期出现在类路径中。


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

解决方案

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.

这篇关于gwt maven插件 - 无法在eclipse中运行原型生成的示例项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆