ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Maclean <da...@cm.co.za>
Subject Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Copydir.java
Date Wed, 05 Jul 2000 10:37:04 GMT

On 5 Jul 2000, Stefan Bodewig wrote:

> For some strange reason Project.copyFile checks that the source is
> newer than the target itself - making the check in CopyDir redundant.
> 
> I've added another version of Project.copyFile which can be told to
> ignore the dates - but I don't think this is the right solution. IMHO
> the task should check which files to copy and Project should trust the
> task - so I'd prefer to remove the check from Project.copyFile
> completely.
> 
> Is anybody aware of any task that relies on Project doing the sanity
> check? NetRexxC, CopyFile, Javac and XSLTProcess (in the commented
> part) all test the condition before calling copyFile. The only task
> remaining is Rmic which would probably want to overwrite newer files
> anyway.
> 
> Any objections against removing "destFile.lastModified() <
> sourceFile.lastModified()" from Project.copyFile?

Can it not be conditional depending on the parameter to copyFile (a
boolean) so that tasks that want to make use of that feature may do so
(e.g. Rmic) rather that duplicating the code in lots of tasks. The default
is to ignore the check.

> 
> Stefan
> 


Mime
View raw message