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

            Bug ID: 62071
           Summary: Calling FileSet.setFile twice fails with misleading
                    message
           Product: Ant
           Version: 1.9.9
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Core
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

This was originally raised against Gradle
(https://github.com/gradle/gradle/issues/4212), but we traced the failure back
to a change in behavior in Ant 1.9.8 to fix bug 59402.

A third party Ant task, Installer, creates a FileSet and then calls setFile
twice to create a collection of two files:
https://github.com/tikalk/tikal-ant-installer/blob/master/src_ext/org/tp23/antinstaller/taskdefs/Installer.java#L195-L196

I believe this only worked because both files are in the same directory.

Now the method throws an exception with the message:
> you can only specify one of the dir and file attributes

This is a little confusing because the user never set 'dir' directly (calling
setFile does it under the covers).

The original reporter was able to workaround this and I think the Installer
task isn't following the spirit of the API, so I think the only problem here is
the wonkiness of the error message.  It would be better if it said "you can
only specify the file attribute once" or something like that in this particular
case.

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

Reply via email to