Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.1-beta-1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
If I have more than 1 war target to build, second warXml is replaced by the first one.
Here part of pom.xml
<groupId>doesnt-matter</groupId> <artifactId>Project1</artifactId> <packaging>war</packaging> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1-beta-1</version> <configuration> <classifier>class1</classifier> <webResources> <resource> <directory>${basedir}/src/main/webapp/WEB-INF</directory> <targetPath>WEB-INF</targetPath> <filtering>true</filtering> </resource> </webResources> <archive> <manifest> <addClasspath>true</addClasspath> <classpathPrefix>lib</classpathPrefix> </manifest> </archive> <packagingExcludes>WEB-INF/lib/*.jar, WEB-INF/web-1.xml, WEB-INF/web-2.xml</packagingExcludes> <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes> <webXml>${basedir}/src/main/webapp/WEB-INF/web-1.xml</webXml> </configuration> <executions> <execution> <id>generate-client-2-war</id> <phase>package</phase> <goals> <goal>war</goal> </goals> <configuration> <webResources> <resource> <directory>src/main/webapp/WEB-INF</directory> <targetPath>WEB-INF</targetPath> <filtering>true</filtering> </resource> </webResources> <classifier>class2</classifier> <packagingExcludes> WEB-INF/lib/*.jar, WEB-INF/web-1.xml, WEB-INF/web-2.xml </packagingExcludes> <webXml>${basedir}/src/main/webapp/WEB-INF/web-2.xml</webXml> </configuration> </execution> </executions> </plugin>
So in archive *-class2.war we must have web.xml with web-2.xml content, but really we have web-1.xml content.
Any ideas?
You should try to have two executions, each with it's own <webXml> configuration and remove the configuration from the <build> / <plugins> / <plugin> / <configuration> element.