0

我正在使用和模块开发ear应用程序。maven 构建成功。我继承了. 在托管模式下,我的应用程序不会呈现。在我看到以下错误:gwt web moduleejbgxt modulegwt 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 [错误] 提示:检查模块的继承链;它可能没有继承所需的模块,或者模块可能没有正确添加其源路径条目

这是我的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.xmlgwt 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构建过程中没有编译错误

4

1 回答 1

1

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

<inherits name='com.sencha.gxt.ui.GXT'/>
于 2014-07-22T18:54:23.160 回答