GWT WebApp查找入口点 [英] GWT WebApp finding entry point

查看:107
本文介绍了GWT WebApp查找入口点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有3个模块的Maven项目:api,gwt,web.

I'm having a maven project with 3 module: api, gwt, web.

现在我有2个gwt.xml文件,Web模块创建了war文件

the web module create the war file now I'm having 2 gwt.xml files

client.gwt.xml,它实现了视图,演示者,入口点

client.gwt.xml, from my gwt-module.It implements the views, presenter, entrypoint

<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,从我的网络模块(应在其中部署应用程序)中获取.如您所见com.myapp.admin.client,它继承了gwt模块.

and web.gwt.xml, from my web-module, where the app should be deployed. It inherits the gwt module as you can see 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中添加了一个依赖项.但是我缺少一些继承,因为:

I also added a dependency in my pom.xml with the module. But I'm missing some inherit because:

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模块中的类.但是我对依赖项有足够的了解.感谢您的帮助.

I can follow the trace and I understand why there is no class path in com.myapp.admin.client because when I build my module only the classes from my web module are build. but I thougt with the dependency and the inherits its enough. Thanks for any help.

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>

推荐答案

我敢打赌,您的client jar不包含* .java源文件. GWT需要编译的类和源文件(主要是源文件).

I'd bet your client jar doesn't include the *.java source files. GWT needs both compiled classes and source files (primarily source files).

请参见 http://mojo.codehaus.org/gwt -maven-plugin/user-guide/library.html

这篇关于GWT WebApp查找入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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