title: Updating files inside an existing WAR file
body: <p>I am trying to update files inside an existing WAR file using the ANT WAR task.
  I need to replace a set of xml files in a folder in WAR with new ones from my HDD.</p>
  
  <pre><code>&lt;war destfile="myApp.war" update="true" &gt;
      &lt;zipfileset dir="&lt;PathToStubsFolderOnHDD&gt;" includes="**/*.xml" prefix="&lt;PathToStubsFolderInWAR&gt;"/&gt;
  &lt;/war&gt;
  </code></pre>
  
  <p>This works fine if the original WAR does not have xmls with same name. However if the original WAR contains xmls with same name; WAR task does not update them with files from HDD.</p>
  
  <p>The ANT WAR task documentation reads:</p>
  
  <blockquote>
    <p>update | indicates whether to update or overwrite the destination file if it already exists. Default is "false".<br>
    duplicate | behavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add". </p>
  </blockquote>
  
  <p>if i use update="false"; all other files in the original WAR are deleted and only the new xmls stored.</p>
  
  <p>using duplicate="add" didnot have any effect either.</p>
  
  <p>Any suggestions on how this can be achieved??</p>