https://bz.apache.org/bugzilla/show_bug.cgi?id=61654

            Bug ID: 61654
           Summary: Ant Copy Task Documentation Misleading and Inaccurate
           Product: Ant
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Documentation
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

https://ant.apache.org/manual/Tasks/copy.html

tells us "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."

So we take a look at the attribute itself:
Attribute:overwrite     Description:Overwrite existing files even if the
destination files are newer.   Required:No; defaults to false.

But this is wrong. There are 3 different behaviors this task can perform. Not
merely true, or false.

True - Overwrite files, period. Ignores recentness of source or destination.
False - Do not overwrite files, period. Ignore recentness of source or
destination.
Default - Only overwrite files if source is more recent than destination.

The current representation in the documentation implies that the default
behaves the same as false vie "defaults to false", but that is simply not true.
Anyone looking at the documentation for a way to never overwrite, only copy if
the destination does not have the file from the source will assume 1 of two
things, that the default and false will both never overwrite (and then waste
time debugging having chosen the default) or that neither of them are an
option, as both will look at recentness, and will resort to a <present>
selector, adding unnecessary lines of code and research.

This documentation should be updated to specifically state there are 3
behaviors and that the default results in specific behavior, NOT that it
defaults to false.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to