Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GWT Maven托管模式_Gwt_Maven - Fatal编程技术网

GWT Maven托管模式

GWT Maven托管模式,gwt,maven,Gwt,Maven,经过一些尝试,我无法使托管模式与maven一起工作。我的pom.xml如下所示,我使用的是标准的maven结构: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.4.0</versio

经过一些尝试,我无法使托管模式与maven一起工作。我的pom.xml如下所示,我使用的是标准的maven结构:

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>2.4.0</version>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>i18n</goal>
                        <goal>generateAsync</goal>
                    </goals>
                </execution>
            </executions>

            <configuration>
                <draftCompile>true</draftCompile>
                <strict>true</strict>
                <inplace>false</inplace>
                <runTarget>project.html</runTarget>
                <style>${gwt.style}</style>
                <i18nMessagesBundle>com.domain.client.i18n.Messages</i18nMessagesBundle>
                <i18nConstantsBundle>comdomain.client.properties.ClientProperties</i18nConstantsBundle>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>exploded</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

有什么想法吗?

尝试添加以下配置条目:

<warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory>                          
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<hostedWebapp>${basedir}/src/main/webapp</hostedWebapp>

最后一个可能是真正需要的,实际上

请尝试添加以下配置项:

<warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory>                          
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<hostedWebapp>${basedir}/src/main/webapp</hostedWebapp>

最后一个可能是真正需要的,实际上这是我今天在演示文稿中使用的POM,如果你想比较它们,它可以工作。

这是我今天在演示文稿中使用的POM,如果你想比较它们,它可以工作。

我注意到build和gwt maven插件配置下缺少两个标记

另请参阅—


我注意到build和GWTMaven插件配置下缺少两个标签

另请参阅—


我仍然收到以下错误消息:[警告]您的POM与GWT托管浏览器的托管webapp WEB-INF/classes文件夹不匹配,无法查看您的类。只需将编译的类放入/src/main/webapp/WEB-INF/classes即可:我仍然收到以下错误消息:[警告]您的POM与您的托管webapp WEB-INF/classes文件夹不匹配,GWT托管浏览器无法查看您的类。只需将您编译的类放入/src/main/webapp/WEB-INF/classes即可:因为我已经升级到GWT 2.5,而且它是开箱即用的。自从我升级到GWT 2.5之后,我还没有成功地使它与2.4兼容,而且它是开箱即用的。还没有成功地使它与2.4兼容