Le 4 janv. 2014 à 16:23, Stefan Bodewig <bode...@apache.org> a écrit :
> Hi all, > > in ResourceUtils#copy we'll use FileChannel#transferFrom if source and > target are Files and we don't need to modify the contents. It looks as > if transferFrom uses mmap under the covers and sometimes fails to do so > - for example when one file is on a network file system[1] but it looks > as if this was not the only issue[2]. > > From the stacktraces in [1] it looks as if all Ant sees is a plain > IOException so we cannot handle the case by falling back to stream based > copying. > > One option could be yet another flag to the copy methods together with > an attribute on all tasks that happen to use it - this would give user > maximal control. Another option may be a system property that users > could set to disable transferFrom in the rare cases where it is causing > problems - which would increase the documentation burden and isn't too > IDE friendly. Other choices? Option 1 seems the best but a lot of work. If I would do it myself, I would go with option 2, together with an new Ant task which allow to set a system property from a build file, to be more IDE friendly. Nicolas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org