【发布时间】:2014-05-16 13:46:25
【问题描述】:
基本上我需要 2 个 maven 模块,一个应该通过从另一个继承客户端源来启动应用程序(因为客户端包括入口点)。 因此我有 2 个 .gwt.xml 文件和 pom.xml 文件。
gwt.gwt.xml
<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='client'/>
<source path='rest'/>
<source path='consts'/>
</module>
web.gwt.xml
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name='com.myapp.admin.gwt' />
POM 客户端(gwt),包装:jar
<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>
POM 网页,包装:战争
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
</plugin>
此外,它还包含与 gwt-module <classifier>sources</classifier> 的依赖关系。我可以毫无错误地编译我的应用程序,但我无法运行它,因为
[错误] [web] - 找不到类型 'com.myapp.admin.client.EntryPoint' [错误] [web] - 提示:检查类型名称 'com.myapp.admin.client.EntryPoint' 是否真的是你的意思 [错误] [web] - 提示:检查您的类路径是否包含所有必需的源根目录
这是合理的,因为目录中没有源。但是为什么没有来源呢?
感谢您的帮助。
【问题讨论】:
-
你(试图)如何运行你的项目?
-
嗨。我正在使用日食。使用 run config -war "path to SNAPSHOT" com.myapp.admin.web (+port 参数等)
标签: google-app-engine maven gwt