I don't think you can do that in one build. But you can use profiles to have two different builds. Of course you will have to build twice, once for each profile but with that you'll have the different builds. I use profiles to run hosted_mode target with fake service servlet implementations and web.xml with appropriate mapping and no security constraints. The normal build will use the deploy web.xml with real servlet mapped and security constraints.
For me this works pretty good and you will not have to alter files (especially pom.xml) for this or that and hence get messy conflicts with your version system. Regards, Andreas On 6 Aug., 19:02, "dane.molotok" <[email protected]> wrote: > I've thought about doing that also, in order to to have a war where > my .gwt.xml inherits the Debug module, and one that does not, but I'm > beginning to think it's not even buying me much to find out how to do > it. I'm assuming you have a similar reason for wanting to do this? > > On Aug 6, 3:57 am, Stephan T <[email protected]> wrote: > > > > > I'm using the GWT-plugin for Maven to build my application. I want to > > build two war-files where the only difference is that I want to use a > > different web.xml. > > > How do I achieve that? > > > Here's my pom.xml: > > <?xml version="1.0" encoding="UTF-8"?> > > <project xmlns="http://maven.apache.org/POM/4.0.0" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0..."> > > <modelVersion>4.0.0</modelVersion> > > > <name>Web Application</name> > > <groupId>my.company</groupId> > > <artifactId>web</artifactId> > > <version>${web-version}</version> > > <packaging>war</packaging> > > > <parent> > > <groupId>my.company</groupId> > > <artifactId>build</artifactId> > > <version>${version}</version> > > <relativePath>../build/pom.xml</relativePath> > > </parent> > > > <build> > > <outputDirectory>war/WEB-INF/classes</outputDirectory> > > <plugins> > > <plugin> > > <groupId>org.codehaus.mojo</groupId> > > <artifactId>gwt-maven-plugin</artifactId> > > <executions> > > <execution> > > <goals> > > <goal>compile</goal> > > > > <!--<goal>generateAsync</goal>--> > > <goal>test</goal> > > </goals> > > </execution> > > </executions> > > </plugin> > > <plugin> > > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-war-plugin</artifactId> > > <configuration> > > > > <warSourceDirectory>war</warSourceDirectory> > > <webXml>war/WEB-INF/web.xml</webXml> > > </configuration> > > </plugin> > > </plugins> > > </build> > > > <dependencies> > > <dependency> > > <groupId>my.company</groupId> > > <artifactId>env-configuration</artifactId> > > <version>${env-configuration-version}</version> > > <type>jar</type> > > <scope>provided</scope> > > </dependency> > > <dependency> > > <groupId>my.company</groupId> > > <artifactId>common</artifactId> > > <version>${common-version}</version> > > <type>jar</type> > > </dependency> > > <dependency> > > <groupId>com.google.gwt</groupId> > > <artifactId>gwt-servlet</artifactId> > > </dependency> > > <dependency> > > <groupId>com.google.gwt</groupId> > > <artifactId>gwt-user</artifactId> > > </dependency> > > <dependency> > > <groupId>com.google.gwt</groupId> > > <artifactId>gwt-incubator</artifactId> > > </dependency> > > <dependency> > > <groupId>org.springframework.security</groupId> > > <artifactId>spring-security-taglibs</artifactId> > > </dependency> > > <dependency> > > <groupId>org.springframework.security</groupId> > > <artifactId>spring-security-config</artifactId> > > </dependency> > > <dependency> > > <groupId>org.springframework.security</groupId> > > <artifactId>spring-security-web</artifactId> > > </dependency> > > <dependency> > > <groupId>jstl</groupId> > > <artifactId>jstl</artifactId> > > </dependency> > > <dependency> > > <groupId>taglibs</groupId> > > <artifactId>standard</artifactId> > > </dependency> > > </dependencies> > > > </project> -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
