Java GWT Maven插件替换web.xml
我有以下maven配置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> <
我的目标是将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插件所做的任何配置