ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ciramella, Edward" <ECirame...@emptoris.com>
Subject RE: Synchronize task
Date Thu, 16 Jan 2003 22:35:14 GMT
Darn, beat me to it...

-----Original Message-----
From: Ed Mack [mailto:edm@wrq.com]
Sent: Thursday, January 16, 2003 5:35 PM
To: 'Ant Users List'
Subject: RE: Synchronize task


Speaking just to the issue of deleting target files which are no longer in
the source directory, you could use a fileset with the "present" selector,
but reversing the source/target directories:

<delete>
  <fileset dir="${target_dir}">
    <present present="srconly" targetdir="${source_dir}"/>
  </fileset>
</delete>

Ed

> -----Original Message-----
> From: Dominique Devienne [mailto:DDevienne@lgc.com] 
> Sent: Thursday, January 16, 2003 2:17 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> 
> Syncing requires deleting files from the target directories no longer
> present from the source directories, and since <copy> accepts 
> <fileset>s
> which do not necessarily include all files of the source 
> directories, this
> complicates things a bit. <lsync> takes care of this nicely AFAIK.
> 
> I'm afraid no amount of <fileset> refinement can delete any 
> files from the
> targets directories no longer present from the source 
> directories (or no
> longer included in the fileset), which is the only advantage 
> <lsync> has
> over <copy>.
> 
> Sorry if my previous post offended you. Cheers, --DD
> 
> -----Original Message-----
> From: Ciramella, Edward [mailto:ECiramella@emptoris.com] 
> Sent: Thursday, January 16, 2003 4:07 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> ..."since that copies possibly unneeded files"...
> 
> Ok, well if you just want to sync up the files/folders, maybe 
> the fileset
> that you are using needs more refinement...
> 
> -----Original Message-----
> From: Dominique Devienne [mailto:DDevienne@lgc.com]
> Sent: Thursday, January 16, 2003 4:55 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> 
> <copy> is already that smart, and syncing is a bit more 
> complex ;-) --DD
> 
> -----Original Message-----
> From: Ciramella, Edward [mailto:ECiramella@emptoris.com] 
> Sent: Thursday, January 16, 2003 3:53 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> Could you use the <uptodate> task?  Then if the property has 
> been set, do
> the copy?
> 
> -----Original Message-----
> From: Dominique Devienne [mailto:DDevienne@lgc.com]
> Sent: Thursday, January 16, 2003 4:37 PM
> To: 'Ant Users List'
> Subject: RE: Synchronize task
> 
> 
> Here's my take on the subject:
> 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12632 

Let me know if it suits you, and post any enhancements you make to the same
place you found it. --DD

-----Original Message-----
From: Armbrust, Daniel C. [mailto:Armbrust.Daniel@mayo.edu] 
Sent: Thursday, January 16, 2003 3:33 PM
To: 'ant-user@jakarta.apache.org'
Subject: Synchronize task

I am looking for a synchronize task for ant (for synchronizing files/and or
directories without requiring using copy, since that copies possibly
unneeded files).

I see someone has looked for one before, but didn't find one, in the mailing
list history.  Has anyone written one since?

If I go off to write it myself, does anyone have any code they could share
that may get me started?

These seems like it should be a pretty basic operation that has already been
implemented over and over again elsewhere...

Thanks, 

Dan

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

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

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

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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message