ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Ant Copy
Date Fri, 15 Aug 2003 16:41:15 GMT
You can also use the new <sync> task in Ant CVS HEAD. It's simpler, and
works with several filesets, filelists, etc... out of the box. --DD

> -----Original Message-----
> From: Hardacker, Andrew [mailto:Andrew.Hardacker@Compuware.com]
> Sent: Friday, August 15, 2003 11:37 AM
> To: 'Ant Users List'
> Subject: RE: Ant Copy
> 
> After the copy step, use a selector to delete unwanted files:
> 
>     <delete>
>       <fileset dir="the_directory_to_clean_up">
>         <not>
>           <present targetdir="the_directory_to_sync_to"/>
>         </not>
>       </fileset>
>     </delete>
> 
> (Thanks once again to JDA)
> 
> Andy
> 
> -----Original Message-----
> From: Vikas Phonsa [mailto:VPhonsa@suz.com]
> Sent: Friday, August 15, 2003 12:01 PM
> To: 'Ant Users List'
> Subject: RE: Ant Copy
> 
> 
> Ok David,
> I had read abt and worked with Ant copy task before I posted this message.
> I
> understand its functions, but I have unique situation at hand so I was
> looking for some means to achieve that, copy task or no copy task.
> 
> I know I could first delete all the files in the destination and then copy
> to it so that the destination doesn't have the unwanted files anymore. But
> that's not an option.
> 
> 
> 
> -----Original Message-----
> From: Harkness, David [mailto:DHarkness@sonypictures.com]
> Sent: Thursday, August 14, 2003 5:44 PM
> To: Ant Users List
> Subject: RE: Ant Copy
> 
> Okay, I'll take a stab at it.
> 
> First, <copy> is not a synchronization task -- it only copies files and
> directories. Thus, you cannot do what you're trying to do (make one
> directory look like another). To be clear, it will *not* result in
> deleting a file *ever*. Perhaps you want to delete the directory
> entirely from project1 and then copy it from project2 to project1?
> 
> Second, I do believe that <copy> checks the modification times of times
> and copies only newer files, but I'm not sure. Have you checked the
> docs? Let's see ...
> 
> ``Copies a file or FileSet to a new file or directory. By default, files
> are only copied if the source file is newer than the destination file,
> or when the destination file does not exist. However, you can explicitly
> overwrite files with the overwrite attribute.''
> 
> Look at that: second sentence of the first paragraph of <copy>'s
> documentation. I know, you were too busy to read the documentation, eh?
> ;)
> 
> David Harkness
> Sony Pictures Digital Networks
> (310) 482-4756
> 
> 
> -----Original Message-----
> From: Vikas Phonsa [mailto:VPhonsa@suz.com]
> Sent: Thursday, August 14, 2003 5:04 PM
> To: 'Ant Users List'
> Subject: Ant Copy
> 
> 
> Sorry guys I'm posting this issue again but I really need some ideas on
> it. Please help.
> 
> 
> I had files A,B,C in Project1 and were copies to Project2. In Project2 I
> deleted the file C but added a new file D. Now when I copy back, Ant
> would copy the new file D to Project1 and other files that were modified
> but I need the file C that was deleted in Project2 to be deleted in
> Project1 also after the  copying back task in completed.
> 
> Project1 should be exactly the same as Project2 after the reverse
> copying.
> 
> I could first delete all the files in Project1 before copying the files
> from Project2 and now Project1 would not have the deleted file C. But
> deleting files from Project1 before copying to it is not an option.
> 
> Anybody done something similar. Do I write a new task ??
> 
> Any ideas ??
> 
> 
> Vik
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> The contents of this e-mail are intended for the named addressee only. It
> contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or
> disclose
> it to anyone else. If you received it in error please notify us
> immediately
> and then destroy it.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

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


Mime
View raw message