1) It's because I forgot to remove the value="" from the <propertyref> sub-element, otherwise it would have been obvious. It adds the given (named) property to the property set. The property is defined elsewhere. The question would actually be whether it should require the property referenced to already exists or not (I think it should).
<propertyset id="ps2"> <propertyset refid="ps1" /> <propertyref name="p3" /> <!-- or do you prefer one the forms below: <propertyref refname="p3" /> <property refname="p3" /> --> </propertyset> In essence, it should be <property refid="propname"/> to be more Ant-consistent, but that would force defining an 'id' for each property, when the property name already acts as an ID, and that would also _overload_ <property> once more, which I've read on this list is not a good idea. 2) This 'propertysetrefs' attribute would be there to indicate that all the properties loaded from a properties file (using <property file=""/>) should be added to the given list of property sets (thru their IDs). Since <propertyset>s could be composed (using <propertyset refid=""/>), this attribute could be 'propertysetref' instead (taking a single ID), which would avoid parsing the IDs, allowing any name as an ID (no special separating character). My question for you Diane, Ant Guru in Chief, would be to know whether you would find <propertyset> valuable? I'm not sure Stefan's "Why don't you [SUBMIT] it" was an implicit yes to the same question. Since Ant Core tasks such as <java> would need to be modified, as well as <junit> and possibly others, no need for me to waste cycles doing this to get -1'd later when I do [SUBMIT] patches for this. Thanks, --DD -----Original Message----- From: Diane Holt [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 10:19 AM To: Ant Users List Subject: RE: Property element of ant task needs an "if" --- Dominique Devienne <[EMAIL PROTECTED]> wrote: > Actually, I've asked for a <propertyset> datatype before, [snip] > <propertyset id="ps1"> > <property name="p1" value="x" /> > <property name="p2" value="y" /> > </propertyset> > > <property name="p3" value="z" /> > > <!-- Can nest property sets. > Alternate way to had a property to a property set. --> > <propertyset id="ps2"> > <propertyset refid="ps1" /> > <propertyref name="p3" value="y" /> > </propertyset> I'm not sure I understand what <propertyref> is for/doing. > <!-- This ones actually debatable... Might be better to only > be able to inject all the properties of a properties file > inside a propertyset by declaring it inside a <propertyset> > element? Or <propertyfile> be used instead??? --> > <property file="somefile.properties" > propertysetrefs="ps1, ps2" /> Ditto the plural one here. Diane ===== ([EMAIL PROTECTED]) __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>