You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2010/08/12 09:02:32 UTC
[jira] Commented: (MWAR-195) When packaging more than 1 war, webXml
doesn't work
[ http://jira.codehaus.org/browse/MWAR-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231741#action_231741 ]
Dennis Lundberg commented on MWAR-195:
--------------------------------------
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.
> When packaging more than 1 war, webXml doesn't work
> ---------------------------------------------------
>
> Key: MWAR-195
> URL: http://jira.codehaus.org/browse/MWAR-195
> Project: Maven 2.x WAR Plugin
> Issue Type: Bug
> Affects Versions: 2.1-beta-1
> Reporter: Vitali Kviatkouski
> Priority: Critical
>
> If I have more than 1 war target to build, second warXml is replaced by the first one.
> Here part of pom.xml
> {code: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>
> {code}
> 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?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira