【发布时间】:2014-05-15 03:49:39
【问题描述】:
我有一个包含 3 个模块的 maven 项目:api、gwt、web。
web 模块现在创建了 war 文件,我有 2 个 gwt.xml 文件
client.gwt.xml,来自我的 gwt 模块。它实现了视图、演示者、入口点
<module>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name='org.fusesource.restygwt.RestyGWT' />
<!--Specify the app entry point class. -->
<entry-point class='com.myapp.admin.client.EntryPoint'/>
<source path='rest'/>
<source path='client'/>
<source path='consts'/>
</module>
和 web.gwt.xml,来自我的 web 模块,应该在其中部署应用程序。它继承了 gwt 模块,你可以看到 com.myapp.admin.client。
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name='com.myapp.admin.client' />
我还在我的 pom.xml 中添加了一个依赖模块。但我缺少一些继承,因为:
Compiling module com.myapp.admin.web
Finding entry point classes
[ERROR] Unable to find type 'com.myapp.admin.client.EntryPoint
[ERROR] Hint: Check that the type name 'com.myapp.admin.client.EntryPoint'
[ERROR] Hint: Check that your classpath includes all required source roots
我可以跟踪跟踪,我理解为什么 com.myapp.admin.client 中没有类路径,因为当我构建我的模块时,只构建来自我的 web 模块的类。但我认为依赖和继承它就足够了。感谢您的帮助。
编辑:POM.xml WEB
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
</plugin>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
</plugin>
POM.xml 客户端
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
【问题讨论】:
标签: java google-app-engine maven gwt