Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/14.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
Java GWT Maven插件替换web.xml_Java_Xml_Maven_Gwt_Gwt Maven Plugin - Fatal编程技术网

Java GWT Maven插件替换web.xml

Java GWT Maven插件替换web.xml,java,xml,maven,gwt,gwt-maven-plugin,Java,Xml,Maven,Gwt,Gwt Maven Plugin,我有以下maven配置 我的目标是将web xml用于开发模式,从通常的web.xml替换为web-dev.xml gwt maven插件似乎有配置工作(webXml),但它不能像eclipse插件(作为web应用程序运行)那样工作,当mvn gwt:run时也不能 <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <

我有以下maven配置
我的目标是将web xml用于开发模式,从通常的web.xml替换为web-dev.xml
gwt maven插件似乎有配置工作(webXml),但它不能像eclipse插件(作为web应用程序运行)那样工作,当mvn gwt:run时也不能

<plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>${gwtVersion}</version>

            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
                <hostedWebapp>${webappDirectory}</hostedWebapp>
                <runTarget>index.html</runTarget>
                <style>PRETTY</style>
                <webXml>src/main/webapp/WEB-INF/web-dev.xml</webXml>
                <inplace>true</inplace>
            </configuration>
        </plugin>

org.codehaus.mojo
GWTMaven插件
${gwtVersion}
编译
真的
${webappDirectory}
index.html
漂亮的
src/main/webapp/WEB-INF/WEB-dev.xml
真的
不管怎样,
webXml
配置参数实际上只用于目标(现在几乎没有用处)

试着用另一种方式来做:
web.xml
用于dev,以及
web-prod.xml
用于prod,您在
maven-war插件中配置它,因为
gwt:run
将原样复制您的
src/main/webapp
,绕过您为
maven-war插件所做的任何配置