Thanks Scott

 

So I run the tar target each time regardless of whether any files have changed 
or not.  Is the Tar task smart enough to detect that if there were no changes, 
there's nothing to do? Apparently it is. 

 

C:\MyCVS\src\>ant tar
Buildfile: build.xml

tar:
      [tar] Nothing to do: C:\MyCVS\src\dist\ShellScripts.tar is up to date.

 

BUILD SUCCESSFUL
Total time: 0 seconds
---------------------------- 
> Date: Thu, 15 Oct 2009 13:43:03 -0400
> From: sflo...@nc.rr.com
> To: user@ant.apache.org
> Subject: Re: Tar Task
> 
> 
> 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-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
> 
                                          
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141665/direct/01/

Reply via email to