title: Simple WAR file merging - overwriting first WAR file with second WAR file
body: <p>I want to simply merge two WAR files, overwriting corresponding files in first WAR with files from second WAR i.e. output WAR will contain web.xml from second WAR if one was present there. I am trying to use cargo-maven2-plugin but I have problems with that. Cargo has some sophisticated mechanism for merging web.xml and in most cases the result is different from that what I need.</p>
  
  <p>I tried some uberwar configurations similar to following ones:</p>
  
  <p>1)</p>
  
  <pre><code>&lt;uberwar&gt;
  &lt;wars&gt;
      &lt;war&gt;com.xyz:core-module&lt;/war&gt;
      &lt;war&gt;com.xyz:core-extension-module&lt;/war&gt;
  &lt;/wars&gt;
  &lt;merges&gt;
      &lt;merge&gt;
          &lt;type&gt;web.xml&lt;/type&gt;
          &lt;parameters&gt;
              &lt;default&gt;
                  &lt;tag name="servlet"&gt;
                      &lt;strategy name="Overwrite" /&gt;
                  &lt;/tag&gt;
                  &lt;tag name="servlet-mapping"&gt;
                      &lt;strategy name="Overwrite" /&gt;
                  &lt;/tag&gt;
              &lt;/default&gt;
          &lt;/parameters&gt;
      &lt;/merge&gt;
  &lt;/merges&gt;
  &lt;/uberwar&gt;
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>&lt;uberwar&gt;
  &lt;wars&gt;
      &lt;war&gt;com.xyz:core-module&lt;/war&gt;
      &lt;war&gt;com.xyz:core-extension-module&lt;/war&gt;
  &lt;/wars&gt;
  &lt;merges&gt;
      &lt;merge&gt;
          &lt;type&gt;web.xml&lt;/type&gt;
          &lt;parameters&gt;
              &lt;default&gt;
                  &lt;tag name="servlet"&gt;
                      &lt;strategy name="NodeMerge"&gt;
                          &lt;servlet&gt;
                              &lt;servlet-name&gt;$left:servlet-name&lt;/servlet-name&gt;
                              &lt;servlet-class&gt;$right:servlet-class&lt;/servlet-class&gt;
                          &lt;/servlet&gt;
                      &lt;/strategy&gt;
                  &lt;/tag&gt;
                  &lt;tag name="servlet-mapping"&gt;
                      &lt;strategy name="NodeMerge"&gt;
                          &lt;servlet-mapping&gt;
                              &lt;servlet-name&gt;$left:param-name&lt;/servlet-name&gt;
                              &lt;url-pattern&gt;$right:param-value&lt;/url-pattern&gt;
                          &lt;/servlet-mapping&gt;
                      &lt;/strategy&gt;
                  &lt;/tag&gt;
              &lt;/default&gt;
          &lt;/parameters&gt;
      &lt;/merge&gt;
  &lt;/merges&gt;
  &lt;/uberwar&gt;
  </code></pre>
  
  <p>In both cases I do not get what I want or even something similar to that what I want. Do you have any idea what I am doing wrong? Or maybe Cargo isn't a good tool for that... do you know any other tools that could do same thing and could be integrated with Maven? Thanks.</p>