Bug 56689

Summary: id/refid not available in ResourceCollection
Product: Ant Reporter: Jochen Wiedmann <jochen>
Component: Core tasksAssignee: Ant Notifications List <notifications>
Status: NEEDINFO ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description Jochen Wiedmann 2014-07-02 07:23:46 UTC
AFAIK, it is not possible to create or use a Reference to a ResourceCollection, because the id/refid attributes aren't present in the respective implementation classes.

This is a serious constraint, because (for example) there is no possibility to pass resource collections to a macro.
Comment 1 Stefan Bodewig 2014-07-04 04:14:34 UTC
Not sure I follow you here.

It is true the ResourceCollection interface doesn't support refif/id directly but (almost?) all concrete implementations of the interface do.  What exactly are your trying to do that isn't possible?

I'm not completely sure we have documented it, but I think we do.  The <resources> type is the generic collection if you need a placeholder for any type of resource collection.  It's getRef() method casts the ref to ResourceCollection and not to any concrete subclass.

http://ant.apache.org/manual/Types/resources.html#resources
Comment 2 Jan Mat 2015-06-10 19:50:31 UTC
nearly 1yr after Stefans feedback.
Is the problem solved?