That's the main issue - the file can't be written to. Since this exception is thrown when creating a FileOutputStream, the issue is not caused by the XML file not existing. That leaves the following options:
1) Folder C:\CMSdot2\plugins\CustomLogin\testreport does not exist yet. However, it should have been created by the makedir target which is triggered by the compile script.
2) You (read: the user running ANT) don't have enough rights to write to this folder. The exception message isn't always telling the truth.
3) You (read: the user running ANT) don't have enough rights to write to this file.
4) The file is still in use by some process.
5) ?? (I can't think of any more reasons).