ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject RE: local properties note WAS PropertySet use in macro
Date Thu, 02 Sep 2004 14:00:02 GMT
Also, you can vote for it at
http://issues.apache.org/bugzilla/show_bug.cgi?id=23942

if you like.

-Matt
--- "Dick, Brian E." <Brian.Dick@FMR.com> wrote:

> I have seen bits of the <local> element proposal in
> this list group, but
> not a full spec. So, my comment was based on
> incomplete info.
> 
> After posting my workaround I dropped the
> "@{refid}:" from the
> "${@{refid}:property}" and simply used
> "${property}". Your follow-up
> description of the <local> element with a
> <propertyset> nested element
> sounds similar to my workaround, now. You would also
> be providing local
> scope for the properties which is a plus.
> 
> Sounds good. Put me on the "interested party" list
> for this feature.
> 
> -----Original Message-----
> From: Matt Benson [mailto:gudnabrsam@yahoo.com] 
> Sent: Wednesday, September 01, 2004 6:20 PM
> To: Ant Users List
> Subject: RE: local properties note WAS PropertySet
> use in macro
> 
> 
> Since references are mutable, they should work, so
> that's good.  What I was thinking for <local> with
> <propertyset>s was that all properties in the set
> would get locally set to their mapped keys.  This
> way
> you could temporarily access a more specific
> property
> by a generic name.  Does that make it clear or do I
> have to type out an example?  :)
> 
> -Matt
> 
> --- "Dick, Brian E." <Brian.Dick@FMR.com> wrote:
> 
> > I take Dominique's hardline stance as positive.
> The
> > last thing I would
> > want is a hack to the ant core. Besides, he hasn't
> > called me any names,
> > yet.
> > 
> > I don't think <local> is the solution either,
> > because that provides
> > local scope for properties SET in the macro. I
> don't
> > want to set any
> > properties. I just want to access the properties
> in
> > a given propertyset.
> > And if there is a mapper specified, I want to
> access
> > the properties by
> > their mapped name.
> > 
> > I wrote the following to get my by until someone
> > comes up with something
> > better. It allows me to access the properties in
> my
> > macro using
> > $(@{refid}:property}.
> > 
> >    <scriptdef name="copypropertyset"
> > language="javascript">
> >       <attribute name="refid"/>
> > 
> >       <![CDATA[
> >         refId      = attributes.get("refid");
> >         properties =
> > project.getReference(refId).getProperties();
> > 
> >         for (keys = properties.propertyNames();
> > keys.hasMoreElements();)
> > {
> >            oldkey = keys.nextElement();
> >            newkey = refId + ":" + oldkey;
> >            project.setProperty(newkey,
> > properties.getProperty(oldkey));
> >         }
> >       ]]>
> >    </scriptdef>
> > 
> > -----Original Message-----
> > From: Matt Benson [mailto:gudnabrsam@yahoo.com] 
> > Sent: Wednesday, September 01, 2004 3:11 PM
> > To: Ant Users List
> > Subject: local properties note WAS PropertySet use
> > in macro
> > 
> > 
> > --- Dominique Devienne <DDevienne@lgc.com> wrote:
> > > The fact that you can do something doesn't mean
> we
> > > should
> > > be doing it. Whatever you are trying to do you
> > think
> > > needs
> > > such a hack, you'd better consider writing
> custom
> > > tasks for.
> > 
> > That's awfully hardline.  :)  One thing that did
> > occur
> > to me that is kind of a negative is that the
> > <propertyset> is not a child of <macrodef>, but a
> > child of the MacroInstance.
> > 
> > This brings me back to local properties.  So when
> > (!)
> > the <local> patch goes in, an optional usage could
> > be
> > to omit the name and value attributes, instead
> > specifying a <propertyset>.  This would only make
> > sense with a <mapper>, but wouldn't hurt anything
> > without.
> > 
> > Now, then...
> > 
> > -Matt
> > 
> > 
> > 	
> > 		
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - 100MB free storage!
> > http://promotions.yahoo.com/new_mail 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@ant.apache.org
> > For additional commands, e-mail:
> > user-help@ant.apache.org
> > 
> > 
> 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter
> now.
> http://promotions.yahoo.com/goldrush
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

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


Mime
View raw message