ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <sflo...@nc.rr.com>
Subject Re: Tar Task
Date Thu, 15 Oct 2009 17:43:03 GMT

It should just over-write it for you automatically...

Here is an example of what I did:

<project>
     <tar destfile="DIST/ShellScripts.tar" basedir="shell" 
excludes="**/cvs/**"/>
</project>

# echo  "hello" > shell/foo.txt
# ant
Buildfile: build.xml
       [tar] Building tar: 
/home/sfloess/development/test/ant3/DIST/ShellScripts.tar
# tar tvf DIST/ShellScripts.tar
-rw-r--r-- 0/0               6 2009-10-15 13:37:50 foo.txt
# mv shell/foo.txt shell/alpha.txt
# ant
Buildfile: build.xml
       [tar] Building tar: 
/home/sfloess/development/test/ant3/DIST/ShellScripts.tar

BUILD SUCCESSFUL
Total time: 1 second
# tar tvf DIST/ShellScripts.tar
-rw-r--r-- 0/0               6 2009-10-15 13:37:50 alpha.txt

Note the first run the tar file had foo.txt in it...

Second run it correctly contained alpha.txt :)


On Wed, 14 Oct 2009, Rez P wrote:

>
> Hello Everyone,
>
>
>
> How do I get the tar task to overwrite its previously created tar file? Please see my
current target below.  I don't want to delete my dist folder each time and I don't see any
options in the help section to overwrite the previous version of ShellScripts.tar.
>
>
>
> <target name="tar" >
>  <tar destfile="${dist}/ShellScripts.tar"
>   basedir="shell"
>   excludes="**/cvs/**"
>  />
> </target>
>
>
>
> Thanks
>
>
>
> Rez
> 
> _________________________________________________________________
> Hotmail: Trusted email with powerful SPAM protection.
> http://clk.atdmt.com/GBL/go/177141665/direct/01/

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate   http://sourceforge.net/projects/jplate
Chief Architect JavaPIM  http://sourceforge.net/projects/javapim

Architect Keros          http://sourceforge.net/projects/keros

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message