Return-Path: X-Original-To: apmail-ant-dev-archive@www.apache.org Delivered-To: apmail-ant-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AE7A39C7D for ; Mon, 6 Feb 2012 07:26:02 +0000 (UTC) Received: (qmail 3866 invoked by uid 500); 6 Feb 2012 07:26:02 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 3601 invoked by uid 500); 6 Feb 2012 07:25:58 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 3588 invoked by uid 99); 6 Feb 2012 07:25:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 07:25:56 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [88.84.128.168] (HELO samaflost.de) (88.84.128.168) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2012 07:25:51 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by samaflost.de (Postfix) with ESMTP id 879C6289800B for ; Mon, 6 Feb 2012 08:25:30 +0100 (CET) Received: from samaflost.de ([127.0.0.1]) by localhost (v35516.1blu.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w6myYPjLomlD for ; Mon, 6 Feb 2012 08:25:27 +0100 (CET) Received: by samaflost.de (Postfix, from userid 1000) id C65A82898012; Mon, 6 Feb 2012 08:25:27 +0100 (CET) From: Stefan Bodewig To: dev@ant.apache.org Subject: Re: Java NIO support References: Date: Mon, 06 Feb 2012 08:25:27 +0100 In-Reply-To: (Mansour Al Akeel's message of "Sun, 5 Feb 2012 05:01:04 -0500") Message-ID: <87obtc1l08.fsf@v35516.1blu.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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