我在Win XP,Maven 3.0.3和GWT 2.4上使用Eclipse Indigo.我按照这里的说明创建了一个GWT-Maven项目并将其导入Eclipse - http://mojo.codehaus.org/gwt-maven-plugin/user-guide/archetype.html.在我添加了一个额外的源文件夹(target/generated-sources/gwt,指令中没有提到的步骤)之后,我右键单击了我的项目,选择了"Run As" - >"Web Application"并得到了这个错误.. .
Loading modules
com.myco.clearing.product.ProductPlus
[ERROR] Unable to find 'com/myco/clearing/product/ProductPlus.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
[ERROR] shell failed in doStartup method
Run Code Online (Sandbox Code Playgroud)
您有什么想法我可以配置Eclipse来解决这个问题吗?除了我提到的步骤之外,我还没有做任何其他事情.
.gwt.xml文件由原型创建,位于src/main/resources/war目录中.它的内容是
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='ProductPlus'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- We need the JUnit module in the main module, -->
<!-- otherwise eclipse complains (Google plugin bug?) -->
<inherits name='com.google.gwt.junit.JUnit' />
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='war.client.ProductPlus' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module>
Run Code Online (Sandbox Code Playgroud)
谢谢, - 戴夫
尝试使用 m2Eclipse 来运行您的应用程序...因为您的应用程序是 Maven 化的,所以您在尝试使用 GWT Eclipse 插件运行它时可能会遇到麻烦。我所做的是:
也许这也会有所帮助: - 确保在Project > Properties > Google > Web Toolkit中,选中了“Use Google Web Toolkit”复选框(这应该自动将生成的文件夹添加到您的类路径中”。 - 检查 Eclipse 是否知道这是一个 Maven 项目。如果是,您应该有一个名为“Maven Dependencies”的文件夹。如果不是,请右键单击您的项目,选择“配置”>“转换为 Maven 项目”
归档时间: |
|
查看次数: |
4488 次 |
最近记录: |