Ant: How do I add to a tar file

From: Ronald Fischer (ronaldf_at_eml.cc)
Date: 11/12/03


Date: 12 Nov 2003 01:14:17 -0800

Unlike the <jar> and <zip> tasks of ant, the <tar> task does not provide an
'update' parameter to specify, wheather the archive should be overwritten or not.
How can I then add something to an existing tar archive? For example, when I
have

  <target ...>
     ....
     <tar destfile="exp.tar" >
        <tarfileset mode="0660" dir="." includes="foo,bar"/>
     </tar>
     ....
     <tar destfile="exp.tar" >
        <tarfileset mode="0660" dir="." includes="baz"/>
     </tar>
  </target>

Ant says:

      ....
      [tar] Building tar: H:\exp\exp.tar
      ....
      [tar] Nothing to do: H:\exp\exp.tar is up to date.

and exp.tar contains only foo and bar, but not baz.

Ronald