Domanda

I have the following maven configuration
my goal is to replace web-xml for development mode from usual web.xml to web-dev.xml
gwt-maven-plugin seems to have configuration wor it (webXml) but it's not working not as eclipse plugin (run as web application), not when 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>
È stato utile?

Soluzione

Despite what the doc says, the webXml configuration parameter is actually only used for the mergewebxml goal (almost useless nowadays).

Try doing things the other way around: web.xml for dev, and a web-prod.xml for prod that you configure in the maven-war-plugin, as gwt:run will copy your src/main/webapp as-is, bypassing any configuration you could have made for the maven-war-plugin.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top