[ https://issues.apache.org/jira/browse/MWAR-440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Lundberg closed MWAR-440. -------------------------------- Resolution: Not A Problem > When it is necessary to build more than one WAR archive at the same time, it > fails to set different web.xml > ----------------------------------------------------------------------------------------------------------- > > Key: MWAR-440 > URL: https://issues.apache.org/jira/browse/MWAR-440 > Project: Maven WAR Plugin > Issue Type: Bug > Affects Versions: 3.0.0, 3.2.0, 3.2.2 > Reporter: Tuzhilkin Mikhail > Priority: Major > > In an assembly, I need to create 2 WAR archives with different web.xml files > at a time. > For this I use the following plugin setting: > {code:xml} > <plugin> > <artifactId>maven-war-plugin</artifactId> > <version>3.2.2</version> > <configuration> > <packagingExcludes>web?.xml</packagingExcludes> > <skip>true</skip> > </configuration> > <executions> > <execution> > <id>1</id> > <phase>package</phase> > <goals> > <goal>war</goal> > </goals> > <configuration> > <skip>false</skip> > <webXml>src/main/webapp/web1.xml</webXml> > <warName>web1</warName> > </configuration> > </execution> > <execution> > <id>2</id> > <phase>package</phase> > <goals> > <goal>war</goal> > </goals> > <configuration> > <skip>false</skip> > <webXml>src/main/webapp/web2.xml</webXml> > <warName>web2</warName> > </configuration> > </execution> > </executions> > </plugin> > {code} > {code} > Project structure: > src/main/webapp/web1.xml > src/main/webapp/web2.xml > pom.xml > {code} > {code:xml} > <!-- web1.xml --> > <web-app> > <!-- Content web1.xml--> > </web-app> > {code} > {code:xml} > <!-- web2.xml --> > <web-app> > <!-- Content web2.xml--> > </web-app> > {code} > But the first of the specified files gets into both archives, despite the > different paths <webXml>. > {code} > $ unzip -p web1.war WEB-INF/web.xml > <web-app> > <!-- Content web1.xml--> > </web-app> > $ unzip -p web2.war WEB-INF/web.xml > <web-app> > <!-- Content web1.xml--> > </web-app> > {code} > Example project: [https://github.com/tuzhms/mwar-bug-example] -- This message was sent by Atlassian Jira (v8.20.7#820007)