【问题标题】:GWT Maven plugin replace web.xmlGWT Maven 插件替换 web.xml
【发布时间】:2014-06-23 05:07:06
【问题描述】:

我有以下 maven 配置
我的目标是将开发模式的 web-xml 从通常的 web.xml 替换为 web-dev.xml
gwt-maven-plugin 似乎有配置(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>

【问题讨论】:

    标签: java xml maven gwt gwt-maven-plugin


    【解决方案1】:

    尽管the doc sayswebXml 配置参数实际上只用于mergewebxml 目标(现在几乎没用了)。

    尝试反过来做:web.xml 用于开发,web-prod.xml 用于您在maven-war-plugin 中配置的产品,因为gwt:run 将按原样复制您的src/main/webapp,绕过任何配置你本可以使用maven-war-plugin

    【讨论】:

      猜你喜欢
      • 2011-07-31
      • 2011-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-10-13
      • 2018-11-03
      • 2011-05-02
      • 2011-04-16
      相关资源
      最近更新 更多