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

            Bug ID: 59114
           Summary: Inconsistency in Copy Task with empty FileSet
                    depending on "exclude" pattern
           Product: Ant
           Version: 1.9.6
          Hardware: Macintosh
                OS: other
            Status: NEW
          Severity: minor
          Priority: P3
         Component: Core tasks
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 33622
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33622&action=edit
Reproduction Ant Build Script

Overview:
When you are copying an empty FileSet to a target location, the target
directory is created if the empty FileSet was accomplished with '<exclude
name="*" />' but not if it was accomplished with '<exclude name="**" />'

Steps to Reproduce:
1) Download the attached build.xml into an empty directory.
2) Run 'ant' in that directory.

Actual Results:
The results of 'find .' in that directory are:
$> find .
.
./ant-out
./ant-out/cpyExStar
./build.xml
./src
./src/empty

Expected Results:
Either one of the following would be fine outputs:
$> find .
.
./build.xml
./src
./src/empty

$> find .
.
./ant-out
./ant-out/cpyExStar
./ant-out/cpyExStars
./build.xml
./src
./src/empty

This bug is only concerned with the fact that the Copy task behaves differently
based on whether the empty FileSet is obtained with '<exclude name="*" />' or
'<exclude name="**" />'

I will admit that I have a slight preference for the first of the two possible
'Expected Results' because if you don't have anything to copy to the
destination, why create the destination directory at all. But, I don't really
care as long as it is a consistent and reliable result.

Build Environment:
OS: Mac OS X 10.11.3 (although I suspect it could be reproduced on many)
Java Versions: 1.8.0_72, 1.7.0_79, 1.6.0_65
ant version: 1.9.6 (also reproduced from current master branch of any git repo)

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

Reply via email to