没有源代码可用于com.sencha.gxt类型;你忘了继承一个必需的模块吗?

时间:2013-10-28 21:17:31

标签: gwt gxt

我正在使用eargwt web module模块开发ejb应用程序。 maven成功建立。我继承了gxt module。在托管模式下,我的应用程序无法呈现。在gwt dev mode我看到以下错误:

  

[错误]第62行:没有源代码可用于类型com.sencha.gxt.widget.core.client.Window;你忘了继承一个必需的模块吗?   错误]第71行:没有源代码可用于类型com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;你忘了继承一个必需的模块吗?   [错误]第73行:没有源代码可用于类型com.sencha.gxt.widget.core.client.form.FieldSet;你忘了继承一个必需的模块吗?   ..   ..

     

00:00:15.285 [ERROR]提示:检查模块的继承链;它可能没有继承所需的模块,或者模块可能没有正确添加其源路径条目

这是我的gwt.xml

<module rename-to='xxx'>
 <!-- Inherit the core Web Toolkit stuff.                        -->
 <inherits name='com.google.gwt.user.User'/>

 <inherits name="com.google.gwt.resources.Resources" />

  <inherits name="com.sencha.gxt.ui.GXT" />

  <entry-point class='com.example.XX'/>



   <source path='client'/>
   <source path='shared'/>

 </module>

这是我的pom.xml gwt web app

<properties>
    <gwtVersion>2.5.1</gwtVersion>
    <maven.compiler.source>1.6</maven.compiler.source>
    <maven.compiler.target>1.6</maven.compiler.target>
    <webappDirectory>${project.build.directory}/${project.build.finalName}          </webappDirectory>
</properties>

<build>
    <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

    <plugins>
        <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
            <configuration>
                <packagingExcludes>WEB-iNF/web.xml</packagingExcludes>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>2.5.1</version>
            <executions>
                <execution>
                    <goals>

                        <goal>compile</goal>
                    </goals>
                </execution>
            </executions>
            <!-- for development mode -->
            <configuration>

                <debugSuspend>false</debugSuspend>
                <source>${maven.compiler.source}</source>
                <target>${maven.compiler.target}</target>
                <runTarget>xxx/xxx.html</runTarget>
                <encoding>UTF-8</encoding>
                <hostedWebapp>${webappDirectory}</hostedWebapp>
                <noServer>true</noServer>

                <port>8080</port>

            </configuration>
        </plugin>
        </build>
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-6.0</artifactId>
            <version>2.0.0.Final</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
    <dependency>
        <groupId>com.sencha.gxt</groupId>
        <artifactId>gxt</artifactId>
        <version>3.0.0</version>
    </dependency>


    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-servlet</artifactId>
        <version>${gwtVersion}</version>
    </dependency>
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-user</artifactId>
        <version>${gwtVersion}</version>
    </dependency>
    <dependency>
            <groupId>javax.ejb</groupId>
            <artifactId>ejb-api</artifactId>
            <version>3.0</version>
            <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>3.4.0.GA</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>persistence-api</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>    
        <artifactId>hibernate-validator</artifactId>
        <version>3.1.0.GA</version>
        <scope>provided</scope>
    </dependency>
    </dependencies>

请帮帮我。 maven build

期间没有编译错误

1 个答案:

答案 0 :(得分:1)

在[projectname] .GWT.xml中,您还必须添加对GXT的引用

<inherits name='com.sencha.gxt.ui.GXT'/>