Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / November 2003

Tip: Looking for answers? Try searching our database.

Ant: How do I add to a tar file

Thread view: 
Ronald Fischer - 12 Nov 2003 09:14 GMT
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
Robert Klemme - 12 Nov 2003 11:39 GMT
> 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.
[quoted text clipped - 20 lines]
>
> and exp.tar contains only foo and bar, but not baz.

Did you try "touch baz" after changing build.xml?  Maybe "baz" is older
than "exp.tar" and so ant thinks, the archive is up to date.

   robert


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.