ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: A groovy frontend for Ant
Date Tue, 29 Sep 2009 04:00:55 GMT
On 2009-09-28, Nicolas Lalevée <> wrote:

> Le 28 sept. 09 à 17:32, Stefan Bodewig a écrit :

>> On 2009-09-27, Nicolas Lalevée <> wrote:

>>> Just one thing is worrying me: the ProjectHelper#parse method is
>>> expecting an Object as source, which as the javadoc specifies it can
>>> be a File, an URL, an InputStream, or even a specialized type as
>>> InputSource. Does it really used with something else than a File or
>>> an
>>> URL ?

>> No, we don't do so, but it has been asked for a couple of times.  The
>> main thing holding back an implementation that was using URLs or
>> streams
>> is "what should be use to resolve relative file names".

> I read again the javadoc about URL, and more specifically URI (added
> in java 1.4 so it would be OK now for Ant). There is a function to
> resolve a relative path: URI#resolve(URI). So everywhere Ant would
> manage URI until it has to get the content of the pointed file.

Sure.  But the tasks usually expect a File argument.

Another idea is to allow anything other than a File (a Resource would
probably be the best choice anyway) only for tasks that specify a
basedir (<ant> or a modified <import>) or for build files that specify a
basedir attribute holding an absolute path (most likely ${user.dir}).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message