ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject XmlProperty (was Re: XmlProperty, AntUnit, questions)
Date Wed, 02 Nov 2005 05:09:36 GMT
On Tue, 1 Nov 2005, Matt Benson <gudnabrsam@yahoo.com> wrote:

> I haven't seen you around the lists for awhile until
> recently, Dale...

I have 8-)

> The ongoing resource collection work in Ant HEAD seeks to address
> this exact type of situation in a generic way.  The "right" fix,
> therefore, IMO is to modify XmlProperty to accept its input from a
> resource.

Yes, I support that.  We do have strings as resources and that would
immediately solve Dale's case.

> Since in the case of this task a single resource is wanted as input
> it doesn't seem right to accept a whole resource collection,
> although I suppose that is one option.

I used resource collections in similar situations for the archive of
tarfileset, the nested resource of gzipresource or the inout to the
bunzip2 task for example.  I can easily imagine situations where you
want a collection that contains exactly one resource.  Say you have
two files as options and want to select one of them based on a
property or the OS or whatever.  So I'm all for supporting single
resources by means of a resource collection and a check at runtime,
that asserts the size of the collection.

> This leads me to an issue I've been waiting to present for some
> time: does Ant >= 1.7 need a mechanism for specifying a specifically
> typed resource from a String, and accompanying modifications to
> IntrospectionHelper to... help with the introspection? :) e.g.:
> 
> file:foo
> url:http://ant.apache.org/index.html
> property:foo

In this case, make the <url> resource accept a nested resource and
validate it is a proper URL for the first two and use ${foo} in the
third.

Stefan

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


Mime
View raw message