On Tue, 1 Nov 2005, Matt Benson <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]