简体   繁体   中英

Maven cargo during merging web.xml not include all error-page

I trying to merge two war files using maven cargo plugin. The problem is that. I have only one web.xml in one archive. Other archives not include web.xml. So the situation looks like below:

  • first.war --> with web.xml
  • second.war --> without web.xml
  • third.war --> without web.xml

So after merging my merged file uberwar.war file should contain exactly the same web.xml which is included in first.war.

Every tags in merged web.xml are the same instead of error-page . There is only taken first error-page from web.xml. Rest of the error-page tags are skipped. I dont know why. Have someone exeprience with this plugin and could help with issue?? I will be grateful for any help.

1. assemble.xml

<?xml version="1.0"?>
<uberwar>
    <wars>
       <war>org.vcm.modules:core-web</war>
       <war>org.vcm.modules:attributes-web</war>
       <war>org.vcm.modules:delivers-web</war>
       <war>org.vcm.modules:movies-web</war>
       <war>org.vcm.modules:zones-web</war>
       <war>org.vcm.modules:opinions-web</war>
       <war>org.vcm.modules:payments-web</war>
       <war>org.vcm.modules:storages-web</war>
       <war>org.vcm.modules:taxes-web</war>
       <war>org.vcm.shops:shops-web</war>
   </wars>

2. pom.xml

<plugin>
   <groupId>org.codehaus.cargo</groupId>
   <artifactId>cargo-maven2-plugin</artifactId>
   <version>1.7.9</version>
   <extensions>true</extensions>
   <configuration>
       <descriptor>src/assemble/merge.xml</descriptor>
    </configuration>
</plugin>

I found cause. The problem was with my web.xml version. I used 3.1 when I change to 2.3 the merging process working correct. It seems the cargo plugin analyze the xml in different way when is newest version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM