[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ant-dev
Subject:    Re: Java NIO support
From:       Stefan Bodewig <bodewig () apache ! org>
Date:       2012-02-06 7:25:27
Message-ID: 87obtc1l08.fsf () v35516 ! 1blu ! de
[Download RAW message or body]

On 2012-02-05, Mansour Al Akeel wrote:

> I have been looking and developing some custom task for ant, for the last
> few days. I noticed that ant tasks don't use java.io directly. I am
> assuming this is due to the way java.io.File behave on different platforms,
> and the support for patterns .... etc.

You must not forget that parts of Ant have been written at a time where
Java2 was too new to require it as runtime environment.

> However, now with java 7, we have the Path class that is very convenient to
> use. I think having this will make writing tasks easier, by cuting down the
> steps to convert between ants Path and java.nio.file.Path.
> Are there any interests ?

Yes, there is.

Just now we have voted to accept Java5 (yes, 5, not 7) as our minimum
requirement for Ant's trunk following the upcoming 1.8.3 release.  This
means we can not use Java7 features directly.

One approach that may be possible is to write a FileUtils replacement
using Java7 features.  Almost all file system interactions of Ant go
through FileUtils and Ant's core could detect at runtime whether Java7
is around and use the matching FileUtils class.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic