ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: AW: ProjectHelper : parsing from InputStream
Date Fri, 11 Jan 2008 05:11:23 GMT
<Jan.Materne@rzf.fin-nrw.de> writes:

>> -----Urspr√ľngliche Nachricht-----
>> Von: Stefan Bodewig [mailto:bodewig@apache.org] 

>> The problem is a bit more complex than just allowing a different
>> source.  The main problem are build files that do not specify a
>> basedir attribute on the project tag since Ant then uses the directory
>> holding the build file to resolve relative file references - which
>> certainly doesn't work if it doesn't have a File reference pointing to
>> the input.
>
>
> Could the API require specifying the basedir?

It could.  Or instead require a ResourceFactory returning Resources
that map to Files (like Matt suggests).

I really like the ResourceFactory idea but it can't be as generic as
it sounds unless we change a lot of Ant tasks.

Right now we need the basedir attribute to resolve relative file names
for attribute setters that use the setFoo(File a) signature.

If my build file doesn't contain any relative path at all, then there
is no reason to set (or require) a basedir or a ResourceFactory at
all.

If it does, then the resolved Resources must be Resources that can be
turned into Files or I can't give the tasks what they are asking for.

The ResourceFactory approach would work great for setFoo(Resource a)
attribute setters, but we don't haven them at all and we'd need to
retrofit it into all existing tasks.

Stefan

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


Mime
View raw message